Home
last modified time | relevance | path

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

12345

/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/ojluni/src/main/java/java/util/concurrent/locks/
DStampedLock.java538 WNode h; in unlockWrite() local
542 if ((h = whead) != null && h.status != 0) in unlockWrite()
543 release(h); in unlockWrite()
555 long s, m; WNode h; in unlockRead() local
562 if (m == RUNIT && (h = whead) != null && h.status != 0) in unlockRead()
563 release(h); in unlockRead()
581 long a = stamp & ABITS, m, s; WNode h; in unlock() local
589 if ((h = whead) != null && h.status != 0) in unlock()
590 release(h); in unlock()
597 if (m == RUNIT && (h = whead) != null && h.status != 0) in unlock()
[all …]
DAbstractQueuedLongSynchronizer.java249 Node h = head; in doReleaseShared() local
250 if (h != null && h != tail) { in doReleaseShared()
251 int ws = h.waitStatus; in doReleaseShared()
253 if (!h.compareAndSetWaitStatus(Node.SIGNAL, 0)) in doReleaseShared()
255 unparkSuccessor(h); in doReleaseShared()
258 !h.compareAndSetWaitStatus(0, Node.PROPAGATE)) in doReleaseShared()
261 if (h == head) // loop if head changed in doReleaseShared()
275 Node h = head; // Record old head for check below in setHeadAndPropagate() local
293 if (propagate > 0 || h == null || h.waitStatus < 0 || in setHeadAndPropagate()
294 (h = head) == null || h.waitStatus < 0) { in setHeadAndPropagate()
[all …]
DAbstractQueuedSynchronizer.java715 Node h = head; in doReleaseShared() local
716 if (h != null && h != tail) { in doReleaseShared()
717 int ws = h.waitStatus; in doReleaseShared()
719 if (!h.compareAndSetWaitStatus(Node.SIGNAL, 0)) in doReleaseShared()
721 unparkSuccessor(h); in doReleaseShared()
724 !h.compareAndSetWaitStatus(0, Node.PROPAGATE)) in doReleaseShared()
727 if (h == head) // loop if head changed in doReleaseShared()
741 Node h = head; // Record old head for check below in setHeadAndPropagate() local
759 if (propagate > 0 || h == null || h.waitStatus < 0 || in setHeadAndPropagate()
760 (h = head) == null || h.waitStatus < 0) { in setHeadAndPropagate()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DSynchronousQueue.java305 boolean casHead(SNode h, SNode nh) { in casHead() argument
306 return h == head && in casHead()
307 U.compareAndSwapObject(this, HEAD, h, nh); in casHead()
354 SNode h = head; in transfer() local
355 if (h == null || h.mode == mode) { // empty or same-mode in transfer()
357 if (h != null && h.isCancelled()) in transfer()
358 casHead(h, h.next); // pop cancelled node in transfer()
361 } else if (casHead(h, s = snode(s, e, h, mode))) { in transfer()
367 if ((h = head) != null && h.next == s) in transfer()
368 casHead(h, s.next); // help s's fulfiller in transfer()
[all …]
DExchanger.java378 for (int h = p.hash, spins = SPINS;;) { in arenaExchange()
383 p.hash = h; in arenaExchange()
387 h ^= h << 1; h ^= h >>> 3; h ^= h << 10; // xorshift in arenaExchange()
388 if (h == 0) // initialize hash in arenaExchange()
389 h = SPINS | (int)t.getId(); in arenaExchange()
390 else if (h < 0 && // approx 50% true in arenaExchange()
411 p.hash = h; in arenaExchange()
484 int h = p.hash; in slotExchange() local
490 h ^= h << 1; h ^= h >>> 3; h ^= h << 10; in slotExchange()
491 if (h == 0) in slotExchange()
[all …]
DConcurrentLinkedQueue.java253 Node<E> h = null, t = null; in ConcurrentLinkedQueue() local
256 if (h == null) in ConcurrentLinkedQueue()
257 h = t = newNode; in ConcurrentLinkedQueue()
263 if (h == null) in ConcurrentLinkedQueue()
264 h = t = newNode(null); in ConcurrentLinkedQueue()
265 head = h; in ConcurrentLinkedQueue()
287 final void updateHead(Node<E> h, Node<E> p) { in updateHead() argument
289 if (h != p && casHead(h, p)) in updateHead()
290 lazySetNext(h, h); in updateHead()
342 for (Node<E> h = head, p = h, q;;) { in poll()
[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/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.java155 int h = hash; in hashCode() local
156 if (h == 0) { in hashCode()
158 h = language.hashCode(); in hashCode()
159 h = 31 * h + script.hashCode(); in hashCode()
160 h = 31 * h + region.hashCode(); in hashCode()
161 h = 31 * h + variant.hashCode(); in hashCode()
162 hash = h; in hashCode()
164 return h; in hashCode()
189 int h = language.hashCode(); in Key() local
193 h = 31 * h + LocaleUtils.toLower(region.charAt(i)); in Key()
[all …]
/libcore/ojluni/src/main/java/java/util/
DArraysParallelSortHelpers.java132 int h = n >>> 1, q = h >>> 1, u = h + q; // quartiles in compute() local
133 Relay fc = new Relay(new Merger<T>(s, w, a, wb, h, in compute()
134 wb+h, n-h, b, g, c)); in compute()
135 Relay rc = new Relay(new Merger<T>(fc, a, w, b+h, q, in compute()
136 b+u, n-u, wb+h, g, c)); in compute()
138 new Sorter<T>(rc, a, w, b+h, q, wb+h, g, c).fork();; in compute()
140 b+q, h-q, wb, g, c)); in compute()
141 new Sorter<T>(bc, a, w, b+q, h-q, wb+q, g, c).fork(); in compute()
250 int h = n >>> 1, q = h >>> 1, u = h + q; // quartiles in compute() local
251 Relay fc = new Relay(new Merger(s, w, a, wb, h, in compute()
[all …]
DArrayDeque.java286 final int h = head; in pollFirst() local
288 E result = (E) elements[h]; in pollFirst()
291 elements[h] = null; // Must null out slot in pollFirst()
292 head = (h + 1) & (elements.length - 1); in pollFirst()
530 final int h = head; in delete() local
532 final int front = (i - h) & mask; in delete()
536 if (front >= ((t - h) & mask)) in delete()
541 if (h <= i) { in delete()
542 System.arraycopy(elements, h, elements, h + 1, front); in delete()
546 System.arraycopy(elements, h, elements, h + 1, mask - h); in delete()
[all …]
DProperties.java1022 Hashtable<String,Object> h = new Hashtable<>(); in propertyNames() local
1023 enumerate(h); in propertyNames()
1024 return h.keys(); in propertyNames()
1046 Hashtable<String, String> h = new Hashtable<>(); in stringPropertyNames() local
1047 enumerateStringProperties(h); in stringPropertyNames()
1048 return h.keySet(); in stringPropertyNames()
1061 Hashtable<String,Object> h = new Hashtable<>(); in list() local
1062 enumerate(h); in list()
1063 for (Enumeration<String> e = h.keys() ; e.hasMoreElements() ;) { in list()
1065 String val = (String)h.get(key); in list()
[all …]
DArrayPrefixHelpers.java141 int th = threshold, org = origin, fnc = fence, l, h; in compute() local
143 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute()
144 if (h - l > th) { in compute()
147 int mid = (l + h) >>> 1; in compute()
149 new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h); in compute()
208 for (int i = first; i < h; ++i) // cumulate in compute()
211 else if (h < fnc) { // skip rightmost in compute()
213 for (int i = l + 1; i < h; ++i) // sum only in compute()
293 int th = threshold, org = origin, fnc = fence, l, h; in compute() local
295 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute()
[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/main/java/java/util/concurrent/atomic/
DStriped64.java224 int h; in longAccumulate() local
225 if ((h = getProbe()) == 0) { in longAccumulate()
227 h = getProbe(); in longAccumulate()
234 if ((a = as[(n - 1) & h]) == null) { in longAccumulate()
242 rs[j = (m - 1) & h] == null) { in longAccumulate()
273 h = advanceProbe(h); in longAccumulate()
279 rs[h & 1] = new Cell(x); in longAccumulate()
308 int h; in doubleAccumulate() local
309 if ((h = getProbe()) == 0) { in doubleAccumulate()
311 h = getProbe(); in doubleAccumulate()
[all …]
/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/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.java393 int h = key.threadLocalHashCode & (len - 1); in ThreadLocalMap() local
394 while (table[h] != null) in ThreadLocalMap()
395 h = nextIndex(h, len); in ThreadLocalMap()
396 table[h] = c; in ThreadLocalMap()
611 int h = k.threadLocalHashCode & (len - 1); in expungeStaleEntry() local
612 if (h != i) { in expungeStaleEntry()
617 while (tab[h] != null) in expungeStaleEntry()
618 h = nextIndex(h, len); in expungeStaleEntry()
619 tab[h] = e; in expungeStaleEntry()
696 int h = k.threadLocalHashCode & (newLen - 1); in resize() local
[all …]
/libcore/ojluni/src/main/java/java/security/cert/
DCertificate.java129 int h = hash; in hashCode() local
130 if (h == -1) { in hashCode()
132 h = Arrays.hashCode(X509CertImpl.getEncodedInternal(this)); in hashCode()
134 h = 0; in hashCode()
136 hash = h; in hashCode()
138 return h; in hashCode()
/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/luni/src/main/java/libcore/util/
DFP16.java336 public static short rint(short h) { in rint() argument
337 int bits = h & 0xffff; in rint()
382 public static short ceil(short h) { in ceil() argument
383 int bits = h & 0xffff; in ceil()
426 public static short floor(short h) { in floor() argument
427 int bits = h & 0xffff; in floor()
468 public static short trunc(short h) { in trunc() argument
469 int bits = h & 0xffff; in trunc()
662 public static boolean isInfinite(short h) { in isInfinite() argument
663 return (h & EXPONENT_SIGNIFICAND_MASK) == POSITIVE_INFINITY; in isInfinite()
[all …]

12345