Home
last modified time | relevance | path

Searched refs:elements (Results 1 – 25 of 94) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/util/
DRegularEnumSet.java42 private long elements = 0L; field in RegularEnumSet
49 elements = (-1L >>> (from.ordinal() - to.ordinal() - 1)) << from.ordinal(); in addRange()
54 elements = -1L >>> -universe.length; in addAll()
59 elements = ~elements; in complement()
60 elements &= -1L >>> -universe.length; // Mask unused bits in complement()
92 unseen = elements; in EnumSetIterator()
110 elements &= ~lastReturned; in remove()
121 return Long.bitCount(elements); in size()
130 return elements == 0; in isEmpty()
146 return (elements & (1L << ((Enum)e).ordinal())) != 0; in contains()
[all …]
DJumboEnumSet.java44 private long elements[]; field in JumboEnumSet
51 elements = new long[(universe.length + 63) >>> 6]; in JumboEnumSet()
59 elements[fromIndex] = (-1L >>> (from.ordinal() - to.ordinal() - 1)) in addRange()
62 elements[fromIndex] = (-1L << from.ordinal()); in addRange()
64 elements[i] = -1; in addRange()
65 elements[toIndex] = -1L >>> (63 - to.ordinal()); in addRange()
71 for (int i = 0; i < elements.length; i++) in addAll()
72 elements[i] = -1; in addAll()
73 elements[elements.length - 1] >>>= -universe.length; in addAll()
78 for (int i = 0; i < elements.length; i++) in complement()
[all …]
DArrayDeque.java99 transient Object[] elements; // non-private to simplify nested class access field in ArrayDeque
143 elements = new Object[initialCapacity]; in allocateElements()
153 int n = elements.length; in doubleCapacity()
159 System.arraycopy(elements, p, a, 0, r); in doubleCapacity()
160 System.arraycopy(elements, 0, a, r, p); in doubleCapacity()
161 elements = a; in doubleCapacity()
171 elements = new Object[16]; in ArrayDeque()
212 elements[head = (head - 1) & (elements.length - 1)] = e; in addFirst()
228 elements[tail] = e; in addLast()
229 if ( (tail = (tail + 1) & (elements.length - 1)) == head) in addLast()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DCopyOnWriteArrayList.java81 private transient volatile Object[] elements; field in CopyOnWriteArrayList
87 elements = EmptyArray.OBJECT; in CopyOnWriteArrayList()
102 this.elements = Arrays.copyOf(array, array.length, Object[].class); in CopyOnWriteArrayList()
108 result.elements = result.elements.clone(); in clone()
116 return elements.length; in size()
121 return (E) elements[index]; in get()
129 Object[] snapshot = elements; in containsAll()
149 Object[] snapshot = elements; in indexOf()
154 Object[] snapshot = elements; in indexOf()
165 Object[] snapshot = elements; in lastIndexOf()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DDisabledAlgorithmConstraints.java100 Set<String> elements = null; in permits() local
112 if (elements == null) { in permits()
113 elements = decomposes(algorithm); in permits()
117 for (String element : elements) { in permits()
161 Set<String> elements = new HashSet<String>(); in decomposes() local
181 elements.add(token); in decomposes()
193 if (elements.contains("SHA1") && !elements.contains("SHA-1")) { in decomposes()
194 elements.add("SHA-1"); in decomposes()
196 if (elements.contains("SHA-1") && !elements.contains("SHA1")) { in decomposes()
197 elements.add("SHA1"); in decomposes()
[all …]
/libcore/luni/src/main/java/libcore/reflect/
DAnnotationFactory.java93 AnnotationMember[] elements) { in createAnnotation() argument
94 AnnotationFactory factory = new AnnotationFactory(annotationType, elements); in createAnnotation()
100 private AnnotationMember[] elements; field in AnnotationFactory
114 elements = defs; in AnnotationFactory()
117 elements = new AnnotationMember[defs.length]; in AnnotationFactory()
118 next: for (int i = elements.length - 1; i >= 0; i--) { in AnnotationFactory()
121 elements[i] = val.setDefinition(defs[i]); in AnnotationFactory()
125 elements[i] = defs[i]; in AnnotationFactory()
143 AnnotationMember[] old = elements; in readObject()
164 elements = merged.toArray(new AnnotationMember[merged.size()]); in readObject()
[all …]
/libcore/ojluni/src/main/java/sun/security/x509/
DKeyUsageExtension.java338 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
339 elements.addElement(DIGITAL_SIGNATURE); in getElements()
340 elements.addElement(NON_REPUDIATION); in getElements()
341 elements.addElement(KEY_ENCIPHERMENT); in getElements()
342 elements.addElement(DATA_ENCIPHERMENT); in getElements()
343 elements.addElement(KEY_AGREEMENT); in getElements()
344 elements.addElement(KEY_CERTSIGN); in getElements()
345 elements.addElement(CRL_SIGN); in getElements()
346 elements.addElement(ENCIPHER_ONLY); in getElements()
347 elements.addElement(DECIPHER_ONLY); in getElements()
[all …]
DCertificateSubjectUniqueIdentity.java164 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
165 elements.addElement(ID); in getElements()
167 return (elements.elements()); in getElements()
DCertificateSerialNumber.java170 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
171 elements.addElement(NUMBER); in getElements()
173 return (elements.elements()); in getElements()
DCertificateAlgorithmId.java159 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
160 elements.addElement(ALGORITHM); in getElements()
161 return (elements.elements()); in getElements()
DCertificateX509Key.java151 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
152 elements.addElement(KEY); in getElements()
154 return(elements.elements()); in getElements()
DCertificateIssuerUniqueIdentity.java165 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
166 elements.addElement(ID); in getElements()
168 return (elements.elements()); in getElements()
DCertificateSubjectName.java168 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
169 elements.addElement(DN_NAME); in getElements()
171 return(elements.elements()); in getElements()
DCertificateIssuerName.java168 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
169 elements.addElement(DN_NAME); in getElements()
171 return (elements.elements()); in getElements()
DSubjectKeyIdentifierExtension.java186 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
187 elements.addElement(KEY_ID); in getElements()
189 return (elements.elements()); in getElements()
DCertificateIssuerExtension.java198 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
199 elements.addElement(ISSUER); in getElements()
200 return elements.elements(); in getElements()
DCRLReasonCodeExtension.java210 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
211 elements.addElement(REASON); in getElements()
213 return elements.elements(); in getElements()
DBasicConstraintsExtension.java261 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
262 elements.addElement(IS_CA); in getElements()
263 elements.addElement(PATH_LEN); in getElements()
265 return (elements.elements()); in getElements()
DIssuingDistributionPointExtension.java366 AttributeNameEnumeration elements = new AttributeNameEnumeration(); in getElements() local
367 elements.addElement(POINT); in getElements()
368 elements.addElement(REASONS); in getElements()
369 elements.addElement(ONLY_USER_CERTS); in getElements()
370 elements.addElement(ONLY_CA_CERTS); in getElements()
371 elements.addElement(ONLY_ATTRIBUTE_CERTS); in getElements()
372 elements.addElement(INDIRECT_CRL); in getElements()
373 return elements.elements(); in getElements()
/libcore/jsr166-tests/src/test/java/jsr166/
DCopyOnWriteArraySetTest.java44 static CopyOnWriteArraySet populatedSet(Integer[] elements) { in populatedSet() argument
47 for (int i = 0; i < elements.length; i++) in populatedSet()
48 a.add(elements[i]); in populatedSet()
50 assertEquals(elements.length, a.size()); in populatedSet()
229 Integer[] elements = new Integer[SIZE]; in testIterator() local
231 elements[i] = i; in testIterator()
232 Collections.shuffle(Arrays.asList(elements)); in testIterator()
233 Collection<Integer> full = populatedSet(elements); in testIterator()
238 assertEquals(elements[j], it.next()); in testIterator()
316 Integer[] elements = new Integer[SIZE]; in testToArray() local
[all …]
DCopyOnWriteArrayListTest.java47 static CopyOnWriteArrayList<Integer> populatedArray(Integer[] elements) { in populatedArray() argument
50 for (int i = 0; i < elements.length; i++) in populatedArray()
51 a.add(elements[i]); in populatedArray()
53 assertEquals(elements.length, a.size()); in populatedArray()
268 Integer[] elements = new Integer[SIZE]; in testIterator() local
270 elements[i] = i; in testIterator()
271 Collections.shuffle(Arrays.asList(elements)); in testIterator()
272 Collection<Integer> full = populatedArray(elements); in testIterator()
277 assertEquals(elements[j], it.next()); in testIterator()
436 Integer[] elements = new Integer[SIZE]; in testToArray() local
[all …]
/libcore/dalvik/src/main/java/dalvik/system/
DDexFile.java75 DexFile(File file, ClassLoader loader, DexPathList.Element[] elements) in DexFile() argument
77 this(file.getPath(), loader, elements); in DexFile()
111 … DexFile(String fileName, ClassLoader loader, DexPathList.Element[] elements) throws IOException { in DexFile() argument
112 mCookie = openDexFile(fileName, null, 0, loader, elements); in DexFile()
134 DexPathList.Element[] elements) throws IOException { in DexFile() argument
148 mCookie = openDexFile(sourceName, outputName, flags, loader, elements); in DexFile()
210 int flags, ClassLoader loader, DexPathList.Element[] elements) throws IOException { in loadDex() argument
219 return new DexFile(sourcePathName, outputPathName, flags, loader, elements); in loadDex()
365 ClassLoader loader, DexPathList.Element[] elements) throws IOException { in openDexFile() argument
373 elements); in openDexFile()
[all …]
DDexPathList.java288 Element[] elements = new Element[files.size()]; in makeElements() local
308 elements[elementsPos++] = new Element(file, true, null, null); in makeElements()
313 dex = loadDexFile(file, optimizedDirectory, loader, elements); in makeElements()
323 dex = loadDexFile(file, optimizedDirectory, loader, elements); in makeElements()
341 elements[elementsPos++] = new Element(dir, false, zip, dex); in makeElements()
344 if (elementsPos != elements.length) { in makeElements()
345 elements = Arrays.copyOf(elements, elementsPos); in makeElements()
347 return elements; in makeElements()
356 Element[] elements) in loadDexFile() argument
359 return new DexFile(file, loader, elements); in loadDexFile()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DAbstractQueueTest.java39 private Object[] elements = new Object[CAPACITY]; field in AbstractQueueTest.MockAbstractQueue
55 return (E) elements[currentIndex]; in iterator()
63 elements[i] = elements[i + 1]; in iterator()
83 elements[size++] = o; in offer()
91 E e = (E) elements[0]; in poll()
93 elements[i] = elements[i + 1]; in poll()
103 return (E) elements[0]; in peek()
/libcore/luni/src/test/java/libcore/java/util/
DSpliteratorsTest.java212 int[] elements = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; in test_spliterator_int() local
214 Spliterator.OfInt intSp = Spliterators.spliterator(elements, 0); in test_spliterator_int()
245 assertEquals(Arrays.toString(elements), Arrays.toString(recorded)); in test_spliterator_int()
249 int[] elements = { 123123, 131321312, 1, 2, 3, 4, 32323232, 45454}; in test_spliterator_intOffsetBasic() local
250 Spliterator.OfInt sp = Spliterators.spliterator(elements, 2, 6, 0); in test_spliterator_intOffsetBasic()
262 long[] elements = { 123123, 131321312, 1, 2, 3, 4, 32323232, 45454}; in test_spliterator_longOffsetBasic() local
263 Spliterator.OfLong sp = Spliterators.spliterator(elements, 2, 6, 0); in test_spliterator_longOffsetBasic()
275 double[] elements = { 123123, 131321312, 1, 2, 3, 4, 32323232, 45454}; in test_spliterator_doubleOffsetBasic() local
276 Spliterator.OfDouble sp = Spliterators.spliterator(elements, 2, 6, 0); in test_spliterator_doubleOffsetBasic()
288 long[] elements = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; in test_spliterator_long() local
[all …]

1234