Home
last modified time | relevance | path

Searched refs:h (Results 1 – 25 of 154) sorted by relevance

1234567

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/
DDefaultHandlerTest.java37 private DefaultHandler h = new DefaultHandler(); field in DefaultHandlerTest
41 h.resolveEntity("publicID", "systemID"); in testResolveEntity()
51 h.notationDecl("name", "publicID", "systemID"); in testNotationDecl()
59 h.unparsedEntityDecl("name", "publicID", "systemID", in testUnparsedEntityDecl()
67 h.setDocumentLocator(new LocatorImpl()); in testSetDocumentLocator()
72 h.startDocument(); in testStartDocument()
80 h.endDocument(); in testEndDocument()
88 h.startPrefixMapping("prefix", "uri"); in testStartPrefixMapping()
96 h.endPrefixMapping("prefix"); in testEndPrefixMapping()
104 h.startElement("uri", "name", "qname", new AttributesImpl()); in testStartElement()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/
DHandlerBaseTest.java36 private HandlerBase h = new HandlerBase(); field in HandlerBaseTest
40 h.resolveEntity("publicID", "systemID"); in testResolveEntity()
47 h.notationDecl("name", "publicID", "systemID"); in testNotationDecl()
51 h.unparsedEntityDecl("name", "publicID", "systemID", "notationName"); in testUnparsedEntityDecl()
55 h.setDocumentLocator(new LocatorImpl()); in testSetDocumentLocator()
60 h.startDocument(); in testStartDocument()
68 h.endDocument(); in testEndDocument()
76 h.startElement("name", new AttributeListImpl()); in testStartElement()
84 h.endElement("name"); in testEndElement()
92 h.characters("The quick brown fox".toCharArray(), 4, 11); in testCharacters()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/ext/
DDefaultHandler2Test.java28 private DefaultHandler2 h = new DefaultHandler2(); field in DefaultHandler2Test
36 h.startCDATA(); in testStartCDATA()
44 h.endCDATA(); in testEndCDATA()
52 h.startDTD("name", "publicId", "systemId"); in testStartDTD()
60 h.endDTD(); in testEndDTD()
68 h.startEntity("name"); in testStartEntity()
76 h.endEntity("name"); in testEndEntity()
84 h.comment("<!-- Comment -->".toCharArray(), 0, 15); in testComment()
92 h.attributeDecl("eName", "aName", "type", "mode", "value"); in testAttributeDecl()
100 h.elementDecl("name", "model"); in testElementDecl()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DRemoveIfTester.java37 for (int h = 0; h < 100; ++h) { in runBasicRemoveIfTests()
39 integers.add(h); in runBasicRemoveIfTests()
58 for (int h = 0; h < 100; ++h) { in runBasicRemoveIfTestsUnordered()
60 integers.add((h >>> 2) ^ (h >>> 5) ^ (h >>> 11) ^ (h >>> 17)); in runBasicRemoveIfTestsUnordered()
DObjectsTest.java179 Hello h = new Hello(); in test_hashCode() local
180 assertEquals(h.hashCode(), Objects.hashCode(h)); in test_hashCode()
185 Hello h = new Hello(); in test_requireNonNull_T() local
186 assertEquals(h, Objects.requireNonNull(h)); in test_requireNonNull_T()
196 Hello h = new Hello(); in test_requireNonNull_T_String() local
197 assertEquals(h, Objects.requireNonNull(h, "test")); in test_requireNonNull_T_String()
213 Hello h = new Hello(); in test_requireNonNull_T_Supplier() local
214 assertEquals(h, Objects.requireNonNull(h, () -> "test")); in test_requireNonNull_T_Supplier()
231 assertEquals(h, Objects.requireNonNull(h, (Supplier<String>) null)); in test_requireNonNull_T_Supplier()
/libcore/ojluni/src/main/java/java/util/concurrent/
DSynchronousQueue.java315 boolean casHead(SNode h, SNode nh) { in casHead() argument
316 return h == head && in casHead()
317 SHEAD.compareAndSet(this, h, nh); in casHead()
364 SNode h = head; in transfer() local
365 if (h == null || h.mode == mode) { // empty or same-mode in transfer()
367 if (h != null && h.isCancelled()) in transfer()
368 casHead(h, h.next); // pop cancelled node in transfer()
371 } else if (casHead(h, s = snode(s, e, h, mode))) { in transfer()
387 if (stat < 0 && h == null && head == s) { in transfer()
406 if (h != null && h.next == s) in transfer()
[all …]
DExchanger.java377 for (int h = p.hash, spins = SPINS;;) { in arenaExchange()
382 p.hash = h; in arenaExchange()
386 h ^= h << 1; h ^= h >>> 3; h ^= h << 10; // xorshift in arenaExchange()
387 if (h == 0) // initialize hash in arenaExchange()
388 h = SPINS | (int)t.getId(); in arenaExchange()
389 else if (h < 0 && // approx 50% true in arenaExchange()
412 p.hash = h; in arenaExchange()
485 int h = p.hash; in slotExchange() local
491 h ^= h << 1; h ^= h >>> 3; h ^= h << 10; in slotExchange()
492 if (h == 0) in slotExchange()
[all …]
DConcurrentLinkedQueue.java258 Node<E> h = null, t = null; in ConcurrentLinkedQueue() local
261 if (h == null) in ConcurrentLinkedQueue()
262 h = t = newNode; in ConcurrentLinkedQueue()
266 if (h == null) in ConcurrentLinkedQueue()
267 h = t = new Node<E>(); in ConcurrentLinkedQueue()
268 head = h; in ConcurrentLinkedQueue()
290 final void updateHead(Node<E> h, Node<E> p) { in updateHead() argument
292 if (h != p && HEAD.compareAndSet(this, h, p)) in updateHead()
293 NEXT.setRelease(h, h); in updateHead()
385 for (Node<E> h = head, p = h, q;; p = q) { in poll()
[all …]
DLinkedTransferQueue.java562 private void skipDeadNodesNearHead(Node h, Node p) { in skipDeadNodesNearHead() argument
572 if (casHead(h, p)) in skipDeadNodesNearHead()
573 h.selfLink(); in skipDeadNodesNearHead()
598 restart: for (Node s = null, t = null, h = null;;) { in xfer()
600 : (h = head);; ) { in xfer()
604 if (h == null) h = head; in xfer()
606 if (h != p) skipDeadNodesNearHead(h, p); in xfer()
696 Node h = head, p = h; in firstDataNode() local
712 if (p != h && casHead(h, p)) in firstDataNode()
713 h.selfLink(); in firstDataNode()
[all …]
DConcurrentLinkedDeque.java319 for (Node<E> h = head, p = h, q;;) { in linkFirst()
324 p = (h != (h = head)) ? h : q; in linkFirst()
334 if (p != h) // hop two nodes at a time; failure is OK in linkFirst()
335 HEAD.weakCompareAndSet(this, h, newNode); in linkFirst()
567 Node<E> h, p, q; in updateHead() local
569 while ((h = head).item == null && (p = h.prev) != null) { in updateHead()
575 if (HEAD.compareAndSet(this, h, p)) in updateHead()
580 else if (h != head) in updateHead()
712 for (Node<E> h = head, p = h, q;;) { in first()
717 p = (h != (h = head)) ? h : q; in first()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DHashtableTest.java57 Hashtable h = new Hashtable(); in test_Constructor() local
59 assertEquals("Created incorrect hashtable", 0, h.size()); in test_Constructor()
67 Hashtable h = new Hashtable(9); in test_ConstructorI() local
69 assertEquals("Created incorrect hashtable", 0, h.size()); in test_ConstructorI()
82 Hashtable h = new java.util.Hashtable(10, 0.5f); in test_ConstructorIF() local
83 assertEquals("Created incorrect hashtable", 0, h.size()); in test_ConstructorIF()
140 Hashtable h = hashtableClone(htfull); in test_clear() local
141 h.clear(); in test_clear()
142 assertEquals("Hashtable was not cleared", 0, h.size()); in test_clear()
143 Enumeration el = h.elements(); in test_clear()
[all …]
/libcore/ojluni/src/main/java/sun/util/locale/
DBaseLocale.java266 int h = hash; in hashCode() local
267 if (h == 0) { in hashCode()
269 h = language.hashCode(); in hashCode()
270 h = 31 * h + script.hashCode(); in hashCode()
271 h = 31 * h + region.hashCode(); in hashCode()
272 h = 31 * h + variant.hashCode(); in hashCode()
273 if (h != 0) { in hashCode()
274 hash = h; in hashCode()
277 return h; in hashCode()
336 int h = 0; in hashCode() local
[all …]
/libcore/luni/src/test/java/libcore/java/util/logging/
DOldFormatterTest.java32 Handler h; field in OldFormatterTest
36 h = new StreamHandler(); in setUp()
47 assertEquals("head string is not empty", "", f.getHead(h)); in testGetHead()
48 h.publish(r); in testGetHead()
49 assertEquals("head string is not empty", "", f.getHead(h)); in testGetHead()
54 assertEquals("tail string is not empty", "", f.getTail(h)); in testGetTail()
55 h.publish(r); in testGetTail()
56 assertEquals("tail string is not empty", "", f.getTail(h)); in testGetTail()
/libcore/ojluni/src/test/java/lang/invoke/
DArrayConstructorTest.java50 MethodHandle h = LOOKUP.findConstructor(Object[].class, methodType(void.class)); in testFindConstructorArray() local
72 MethodHandle h = MethodHandles.arrayConstructor(clazz); in testArrayConstructorNegative() local
85 MethodHandle h = MethodHandles.arrayConstructor(String[].class); in testArrayConstructor() local
86 assertEquals(methodType(String[].class, int.class), h.type()); in testArrayConstructor()
87 String[] a = (String[]) h.invoke(17); in testArrayConstructor()
93 MethodHandle h = MethodHandles.arrayConstructor(String[].class); in testArrayConstructorNegativeIndex() local
94 assertEquals(methodType(String[].class, int.class), h.type()); in testArrayConstructorNegativeIndex()
95 h.invoke(-1); // throws exception in testArrayConstructorNegativeIndex()
/libcore/ojluni/src/main/java/java/security/spec/
DECParameterSpec.java45 private final int h; field in ECParameterSpec
61 BigInteger n, int h) { in ECParameterSpec() argument
74 if (h <= 0) { in ECParameterSpec()
80 this.h = h; in ECParameterSpec()
112 return h; in getCofactor()
/libcore/ojluni/src/main/java/java/util/zip/
DZipCoder.java115 int h = 0; in checkedHash() local
122 h = 31 * h + decoded[i]; in checkedHash()
125 h = 31 * h + '/'; in checkedHash()
127 return h; in checkedHash()
222 int h = 0; in checkedHash() local
227 h = 31 * h + b; in checkedHash()
242 h = 31 * h + '/'; in checkedHash()
244 return h; in checkedHash()
/libcore/luni/src/main/java/libcore/util/
DFP16.java313 public static short rint(short h) { in rint() argument
314 int bits = h & 0xffff; in rint()
358 public static short ceil(short h) { in ceil() argument
359 int bits = h & 0xffff; in ceil()
401 public static short floor(short h) { in floor() argument
402 int bits = h & 0xffff; in floor()
442 public static short trunc(short h) { in trunc() argument
443 int bits = h & 0xffff; in trunc()
628 public static boolean isInfinite(short h) { in isInfinite() argument
629 return (h & EXPONENT_SIGNIFICAND_MASK) == POSITIVE_INFINITY; in isInfinite()
[all …]
/libcore/ojluni/src/main/java/java/util/
DArraysParallelSortHelpers.java134 int h = n >>> 1, q = h >>> 1, u = h + q; // quartiles in compute() local
135 Relay fc = new Relay(new Merger<>(s, w, a, wb, h, in compute()
136 wb+h, n-h, b, g, c)); in compute()
137 Relay rc = new Relay(new Merger<>(fc, a, w, b+h, q, in compute()
138 b+u, n-u, wb+h, g, c)); in compute()
140 new Sorter<>(rc, a, w, b+h, q, wb+h, g, c).fork(); in compute()
142 b+q, h-q, wb, g, c)); in compute()
143 new Sorter<>(bc, a, w, b+q, h-q, wb+q, g, c).fork(); in compute()
DArrayPrefixHelpers.java146 int th = threshold, org = origin, fnc = fence, l, h; in compute() local
148 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute()
149 if (h - l > th) { in compute()
152 int mid = (l + h) >>> 1; in compute()
154 new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h); in compute()
213 for (int i = first; i < h; ++i) // cumulate in compute()
216 else if (h < fnc) { // skip rightmost in compute()
218 for (int i = l + 1; i < h; ++i) // sum only in compute()
300 int th = threshold, org = origin, fnc = fence, l, h; in compute() local
302 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute()
[all …]
/libcore/ojluni/src/main/java/java/nio/file/attribute/
DAclEntry.java359 private static int hash(int h, Object o) { in hash() argument
360 return h * 127 + o.hashCode(); in hash()
374 int h = type.hashCode(); in hashCode() local
375 h = hash(h, who); in hashCode()
376 h = hash(h, perms); in hashCode()
377 h = hash(h, flags); in hashCode()
378 hash = h; in hashCode()
/libcore/ojluni/src/main/java/java/lang/
DThreadLocal.java413 int h = key.threadLocalHashCode & (len - 1); in ThreadLocalMap() local
414 while (table[h] != null) in ThreadLocalMap()
415 h = nextIndex(h, len); in ThreadLocalMap()
416 table[h] = c; in ThreadLocalMap()
637 int h = k.threadLocalHashCode & (len - 1); in expungeStaleEntry() local
638 if (h != i) { in expungeStaleEntry()
643 while (tab[h] != null) in expungeStaleEntry()
644 h = nextIndex(h, len); in expungeStaleEntry()
645 tab[h] = e; in expungeStaleEntry()
722 int h = k.threadLocalHashCode & (newLen - 1); in resize() local
[all …]
/libcore/ojluni/src/main/java/java/security/cert/
DCertificate.java130 int h = hash; in hashCode() local
131 if (h == -1) { in hashCode()
133 h = Arrays.hashCode(X509CertImpl.getEncodedInternal(this)); in hashCode()
135 h = 0; in hashCode()
137 hash = h; in hashCode()
139 return h; in hashCode()
/libcore/luni/src/test/java/libcore/javax/xml/datatype/
DDurationImpl.java53 long h = millis / 3600000L; in DurationImpl() local
55 if (h > 0) { in DurationImpl()
56 fields.put(DatatypeConstants.HOURS, h); in DurationImpl()
66 DurationImpl(int sgn, int y, int months, int d, int h, int m, float s) { in DurationImpl() argument
72 if (h >= 0) { fields.put(DatatypeConstants.HOURS, h); } in DurationImpl()
/libcore/ojluni/src/main/java/sun/security/x509/
DExtension.java240 int h = 0; in hashCode() local
245 h += len * val[--len]; in hashCode()
247 h = h * hashMagic + extensionId.hashCode(); in hashCode()
248 h = h * hashMagic + (critical?1231:1237); in hashCode()
249 return h; in hashCode()
/libcore/ojluni/src/main/java/sun/misc/
DASCIICaseInsensitiveComparator.java73 int h = 0;
77 h = 31*h + toLower(s.charAt(i));
80 return h;

1234567