1 57 58 package com.sun.org.apache.xerces.internal.impl.xs.util; 59 60 import java.util.Vector ; 61 62 import com.sun.org.apache.xerces.internal.xs.XSNamespaceItem; 63 import com.sun.org.apache.xerces.internal.xs.XSNamespaceItemList; 64 71 public class NSItemListImpl implements XSNamespaceItemList { 72 73 private XSNamespaceItem[] fArray = null; 75 private int fLength = 0; 77 78 private Vector fVector; 81 82 public NSItemListImpl(Vector v) { 83 fVector = v; 84 fLength = v.size(); 85 } 86 87 93 public NSItemListImpl(XSNamespaceItem[] array, int length) { 94 fArray = array; 95 fLength = length; 96 } 97 98 102 public int getLength() { 103 return fLength; 104 } 105 106 public XSNamespaceItem item(int index) { 107 if (index < 0 || index >= fLength) 108 return null; 109 if (fVector != null) { 110 return (XSNamespaceItem)fVector.elementAt(index); 111 } 112 return fArray[index]; 113 } 114 115 } | Popular Tags |