Searched refs:current (Results 1 - 25 of 79) sorted by relevance

1234

/libcore/ojluni/src/main/java/sun/nio/ch/
H A DNativeThread.java36 // On systems that do not require this type of signalling, the current() method
46 public static native long current(); method in class:NativeThread
/libcore/jsr166-tests/src/test/java/jsr166/
H A DThreadTest.java38 Thread current = Thread.currentThread();
39 ThreadGroup tg = current.getThreadGroup();
41 assertSame(tg, current.getUncaughtExceptionHandler());
42 current.setUncaughtExceptionHandler(eh);
44 assertSame(eh, current.getUncaughtExceptionHandler());
46 current.setUncaughtExceptionHandler(null);
48 assertSame(tg, current.getUncaughtExceptionHandler());
H A DThreadLocalRandomTest.java54 ThreadLocalRandom.current().setSeed(17);
63 int f = ThreadLocalRandom.current().nextInt();
65 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f)
74 long f = ThreadLocalRandom.current().nextLong();
76 while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f)
85 boolean f = ThreadLocalRandom.current().nextBoolean();
87 while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f)
96 float f = ThreadLocalRandom.current().nextFloat();
98 while (i < NCALLS && ThreadLocalRandom.current().nextFloat() == f)
107 double f = ThreadLocalRandom.current()
[all...]
H A DThreadLocalRandom8Test.java43 ThreadLocalRandom r = ThreadLocalRandom.current();
60 ThreadLocalRandom r = ThreadLocalRandom.current();
77 ThreadLocalRandom r = ThreadLocalRandom.current();
92 ThreadLocalRandom r = ThreadLocalRandom.current();
107 ThreadLocalRandom r = ThreadLocalRandom.current();
122 ThreadLocalRandom r = ThreadLocalRandom.current();
141 ThreadLocalRandom r = ThreadLocalRandom.current();
160 ThreadLocalRandom r = ThreadLocalRandom.current();
179 ThreadLocalRandom r = ThreadLocalRandom.current();
190 ThreadLocalRandom r = ThreadLocalRandom.current();
[all...]
H A DExecutorsTest.java313 Thread current = Thread.currentThread();
314 assertTrue(!current.isDaemon());
315 assertTrue(current.getPriority() <= Thread.NORM_PRIORITY);
316 ThreadGroup g = current.getThreadGroup();
322 String name = current.getName();
351 Thread current = Thread.currentThread();
352 assertTrue(!current.isDaemon());
353 assertTrue(current.getPriority() <= Thread.NORM_PRIORITY);
354 ThreadGroup g = current.getThreadGroup();
360 String name = current
[all...]
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
H A DAtomicMarkableReference.java78 * Returns the current value of the reference.
80 * @return the current value of the reference
87 * Returns the current value of the mark.
89 * @return the current value of the mark
96 * Returns the current values of both the reference and the mark.
101 * @return the current value of the reference
112 * current reference is {@code ==} to the expected reference
113 * and the current mark is equal to the expected mark.
136 * current reference is {@code ==} to the expected reference
137 * and the current mar
[all...]
H A DAtomicStampedReference.java78 * Returns the current value of the reference.
80 * @return the current value of the reference
87 * Returns the current value of the stamp.
89 * @return the current value of the stamp
96 * Returns the current values of both the reference and the stamp.
101 * @return the current value of the reference
112 * current reference is {@code ==} to the expected reference
113 * and the current stamp is equal to the expected stamp.
136 * current reference is {@code ==} to the expected reference
137 * and the current stam
[all...]
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DSemaphore.java195 int current = getState();
196 int next = current + releases;
197 if (next < current) // overflow
199 if (compareAndSetState(current, next))
206 int current = getState();
207 int next = current - reductions;
208 if (next > current) // underflow
210 if (compareAndSetState(current, next))
217 int current = getState();
218 if (current
[all...]
H A DLinkedBlockingQueue.java238 // * Tells whether both locks are held by current thread.
313 * less the current {@code size} of this queue.
763 private Node<E> current; field in class:LinkedBlockingQueue.Itr
770 current = head.next;
771 if (current != null)
772 currentElement = current.item;
779 return current != null;
785 if (current == null)
787 lastRet = current;
792 for (Node<E> p = current,
832 Node<E> current; // current node; null until initialized field in class:LinkedBlockingQueue.LBQSpliterator
[all...]
/libcore/ojluni/src/main/java/java/text/
H A DCharacterIterator.java50 * Iterators maintain a current character index, whose valid range is from
53 * The current index can be retrieved by calling getIndex() and set directly
59 * also returned by other methods to indicate that the current index is
132 * Gets the character at the current position (as returned by getIndex()).
133 * @return the character at the current position or DONE if the current
137 public char current(); method in interface:CharacterIterator
142 * to getEndIndex(), the current index is reset to getEndIndex() and
151 * at the new index. If the current index is getBeginIndex(), the index
153 * @return the character at the new position or DONE if the current
[all...]
H A DStringCharacterIterator.java131 return current();
145 return current();
157 return current();
161 * Implements CharacterIterator.current() for String.
162 * @see CharacterIterator#current
164 public char current() method in class:StringCharacterIterator
H A DIcuIteratorWrapper.java266 * Sets the current iteration position to the beginning of the text.
276 * Sets the current iteration position to the end of the text.
293 * the current one.
330 * @return The position of the first break after the current position.
347 // if we start by updating the current iteration position to the
370 * Returns the current iteration position.
372 * @return The current iteration position.
374 public int current() { method in class:IcuIteratorWrapper
375 return wrapped.current();
396 * the current iteratio
[all...]
/libcore/luni/src/test/java/libcore/java/text/
H A DOldDateFormatTest.java93 Date current = new Date();
94 String dtf = format.format(current);
96 assertTrue("Incorrect date format", sdf.format(current).equals(dtf));
113 Date current = new Date();
116 StringBuffer sb = format.format(current, toAppend, fp);
118 assertTrue("Incorrect date format", sdf.format(current).equals(
222 Date current = new Date();
225 Date date = format.parse(format.format(current).toString());
226 assertEquals(current.getDate(), date.getDate());
227 assertEquals(current
[all...]
H A DDateFormatTest.java52 final Date current = new Date(1468250177000L); // 20160711 15:16:17 GMT
54 String actualDateString = format.format(current);
56 String expectedDateString = sdf.format(current);
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
H A DReentrantReadWriteLock.java296 * The number of reentrant read locks held by current thread.
351 * Returns true if the current thread, when trying to acquire
358 * Returns true if the current thread, when trying to acquire
394 Thread current = Thread.currentThread();
399 if (w == 0 || current != getExclusiveOwnerThread())
410 setExclusiveOwnerThread(current);
415 Thread current = Thread.currentThread();
416 if (firstReader == current) {
424 if (rh == null || rh.tid != getThreadId(current))
447 "attempt to unlock read lock, not locked by current threa
497 fullTryAcquireShared(Thread current) argument
[all...]
H A DReentrantLock.java51 * immediately if the current thread already owns the lock. This can
131 final Thread current = Thread.currentThread();
135 setExclusiveOwnerThread(current);
139 else if (current == getExclusiveOwnerThread()) {
164 // we don't need to do so to check if current thread is owner
233 final Thread current = Thread.currentThread();
238 setExclusiveOwnerThread(current);
242 else if (current == getExclusiveOwnerThread()) {
277 * <p>If the current thread already holds the lock then the hold
281 * current threa
[all...]
/libcore/ojluni/src/test/java/nio/file/attribute/
H A DBasicFileAttributeViewCreationTimeTest.java103 FileTime current = creationTime(file);
104 if (!current.equals(creationTime))
117 FileTime current = creationTime(file);
118 if (Math.abs(creationTime.toMillis()-current.toMillis()) > 1000L)
/libcore/dalvik/src/main/java/dalvik/system/
H A DBaseDexClassLoader.java82 * Reports the current class loader chain to the registered {@code reporter}.
94 ClassLoader current = getParent();
96 while (current != null && current != bootClassLoader) {
97 if (current instanceof BaseDexClassLoader) {
98 BaseDexClassLoader bdcCurrent = (BaseDexClassLoader) current;
105 current = current.getParent();
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DAttributedCharacterIteratorTest.java27 * @tests java.text.AttributedCharacterIterator#current()
33 assertEquals("Wrong first", 'T', it.current());
35 assertEquals("Wrong second", 'e', it.current());
38 assertEquals("Wrong last", 'g', it.current());
40 assertTrue("Wrong final", it.current() == CharacterIterator.DONE);
43 assertEquals("Wrong first2", 's', it.current());
151 assertEquals("Wrong first", '2', it.current());
H A DStringCharacterIteratorTest.java162 * @tests java.text.StringCharacterIterator.current()
166 assertEquals('f', fixture.current());
168 assertEquals('i', fixture.current());
172 assertEquals("Wrong current char", 'i', it.current());
299 assertTrue("Wrong current char",
300 it1.current() == CharacterIterator.DONE);
345 assertEquals("Wrong current char", 's', it1.current());
359 assertEquals('f', fixture.current());
[all...]
/libcore/ojluni/src/main/java/java/sql/
H A DSQLException.java289 SQLException current = this;
291 SQLException next=current.next;
293 current = next;
297 if (nextUpdater.compareAndSet(current,null,ex)) {
300 current=current.next;
/libcore/ojluni/src/main/java/java/util/regex/
H A DPattern.java1290 int current = 0;
1291 while ((slashEIndex = s.indexOf("\\E", current)) != -1) {
1292 sb.append(s.substring(current, slashEIndex));
1293 current = slashEIndex + 2;
1296 sb.append(s.substring(current, s.length()));
1398 // when current == input.length there are no more elements
1399 private int current;
1427 if (current == input.length())
1433 nextElement = input.subSequence(current, matcher.start()).toString();
1434 current
[all...]
/libcore/ojluni/src/main/java/java/util/
H A DProperties.java658 int current = 0;
663 while (current < len) {
664 char c = comments.charAt(current);
666 if (last != current)
667 bw.write(comments.substring(last, current));
677 current != len - 1 &&
678 comments.charAt(current + 1) == '\n') {
679 current++;
681 if (current == len - 1 ||
682 (comments.charAt(current
[all...]
H A DWeakHashMap.java475 * If current capacity is MAXIMUM_CAPACITY, this method does not
480 * must be greater than current capacity unless current
1064 WeakHashMap.Entry<K,V> current; // current node field in class:WeakHashMap.WeakHashMapSpliterator
1065 int index; // current index, modified on advance/split
1125 (i < (index = hi) || current != null)) {
1126 WeakHashMap.Entry<K,V> p = current;
1127 current = null; // exhaust
1152 while (current !
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DThreadGroupTest.java60 "Has to be possible to create a subgroup of current group using simple constructor",
79 assertTrue("Has to be possible to create a subgroup of current group",
283 ThreadGroup current = testRoot;
290 current = new ThreadGroup(current, "level " + i);
291 groups.addElement(current);
296 current = groups.elementAt(i);
298 assertTrue("Parent is wrong", current.getParent() == previous);
412 "setMaxPriority: Any value higher than the current one is ignored. Before: "
435 ThreadGroup current
[all...]

Completed in 1545 milliseconds

1234