Home
last modified time | relevance | path

Searched refs:Entry (Results 1 – 25 of 156) sorted by relevance

1234567

/libcore/ojluni/src/main/java/java/util/
DAbstractMap.java27 import java.util.Map.Entry;
112 Iterator<Entry<K,V>> i = entrySet().iterator(); in containsValue()
115 Entry<K,V> e = i.next(); in containsValue()
121 Entry<K,V> e = i.next(); in containsValue()
144 Iterator<Map.Entry<K,V>> i = entrySet().iterator(); in containsKey()
147 Entry<K,V> e = i.next(); in containsKey()
153 Entry<K,V> e = i.next(); in containsKey()
176 Iterator<Entry<K,V>> i = entrySet().iterator(); in get()
179 Entry<K,V> e = i.next(); in get()
185 Entry<K,V> e = i.next(); in get()
[all …]
DWeakHashMap.java160 Entry<K,V>[] table;
194 private Entry<K,V>[] newTable(int n) { in newTable()
195 return (Entry<K,V>[]) new Entry<?,?>[n]; in newTable()
321 Entry<K,V> e = (Entry<K,V>) x; in expungeStaleEntries()
324 Entry<K,V> prev = table[i]; in expungeStaleEntries()
325 Entry<K,V> p = prev; in expungeStaleEntries()
327 Entry<K,V> next = p.next; in expungeStaleEntries()
349 private Entry<K,V>[] getTable() { in getTable()
397 Entry<K,V>[] tab = getTable(); in get()
399 Entry<K,V> e = tab[index]; in get()
[all …]
DNavigableMap.java111 Map.Entry<K,V> lowerEntry(K key); in lowerEntry()
140 Map.Entry<K,V> floorEntry(K key); in floorEntry()
169 Map.Entry<K,V> ceilingEntry(K key); in ceilingEntry()
198 Map.Entry<K,V> higherEntry(K key); in higherEntry()
221 Map.Entry<K,V> firstEntry(); in firstEntry()
230 Map.Entry<K,V> lastEntry(); in lastEntry()
239 Map.Entry<K,V> pollFirstEntry(); in pollFirstEntry()
248 Map.Entry<K,V> pollLastEntry(); in pollLastEntry()
DEnumMap.java29 import java.util.Map.Entry;
370 private transient Set<Map.Entry<K,V>> entrySet;
465 public Set<Map.Entry<K,V>> entrySet() { in entrySet()
466 Set<Map.Entry<K,V>> es = entrySet; in entrySet()
473 private class EntrySet extends AbstractSet<Map.Entry<K,V>> {
474 public Iterator<Map.Entry<K,V>> iterator() { in iterator()
479 if (!(o instanceof Map.Entry)) in contains()
481 Map.Entry<?,?> entry = (Map.Entry<?,?>)o; in contains()
485 if (!(o instanceof Map.Entry)) in remove()
487 Map.Entry<?,?> entry = (Map.Entry<?,?>)o; in remove()
[all …]
DKeyValueHolder.java52 final class KeyValueHolder<K,V> implements Map.Entry<K,V> {
102 if (!(o instanceof Map.Entry)) in equals()
104 Map.Entry<?,?> e = (Map.Entry<?,?>)o; in equals()
/libcore/jsr166-tests/src/test/java/jsr166/
DEntryTest.java35 Map.Entry e = new AbstractMap.SimpleEntry(k1, v1); in testConstructor1()
44 Map.Entry s = new AbstractMap.SimpleImmutableEntry(k1, v1); in testConstructor2()
53 Map.Entry e2 = new AbstractMap.SimpleEntry(k1, v1); in testConstructor3()
54 Map.Entry e = new AbstractMap.SimpleEntry(e2); in testConstructor3()
63 Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); in testConstructor4()
64 Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2); in testConstructor4()
74 Map.Entry e2 = new AbstractMap.SimpleEntry(k1, v1); in testEquals()
75 Map.Entry e = new AbstractMap.SimpleEntry(e2); in testEquals()
76 Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); in testEquals()
77 Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2); in testEquals()
[all …]
DTreeSubMapTest.java209 Map.Entry e = (Map.Entry) it.next();
249 Map.Entry e1 = map.lowerEntry(three);
252 Map.Entry e2 = map.lowerEntry(six);
255 Map.Entry e3 = map.lowerEntry(one);
258 Map.Entry e4 = map.lowerEntry(zero);
267 Map.Entry e1 = map.higherEntry(three);
270 Map.Entry e2 = map.higherEntry(zero);
273 Map.Entry e3 = map.higherEntry(five);
276 Map.Entry e4 = map.higherEntry(six);
285 Map.Entry e1 = map.floorEntry(three);
[all …]
DConcurrentSkipListSubMapTest.java252 Map.Entry e = (Map.Entry) it.next();
362 Map.Entry e1 = map.lowerEntry(three);
365 Map.Entry e2 = map.lowerEntry(six);
368 Map.Entry e3 = map.lowerEntry(one);
371 Map.Entry e4 = map.lowerEntry(zero);
380 Map.Entry e1 = map.higherEntry(three);
383 Map.Entry e2 = map.higherEntry(zero);
386 Map.Entry e3 = map.higherEntry(five);
389 Map.Entry e4 = map.higherEntry(six);
398 Map.Entry e1 = map.floorEntry(three);
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DEntryTest.java58 Map.Entry e = new AbstractMap.SimpleEntry(k1, v1); in testConstructor1()
67 Map.Entry s = new AbstractMap.SimpleImmutableEntry(k1, v1); in testConstructor2()
76 Map.Entry e2 = new AbstractMap.SimpleEntry(k1, v1); in testConstructor3()
77 Map.Entry e = new AbstractMap.SimpleEntry(e2); in testConstructor3()
86 Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); in testConstructor4()
87 Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2); in testConstructor4()
97 Map.Entry e2 = new AbstractMap.SimpleEntry(k1, v1); in testEquals()
98 Map.Entry e = new AbstractMap.SimpleEntry(e2); in testEquals()
99 Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); in testEquals()
100 Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2); in testEquals()
[all …]
DTreeSubMapTest.java232 Map.Entry e = (Map.Entry) it.next();
272 Map.Entry e1 = map.lowerEntry(three);
275 Map.Entry e2 = map.lowerEntry(six);
278 Map.Entry e3 = map.lowerEntry(one);
281 Map.Entry e4 = map.lowerEntry(zero);
290 Map.Entry e1 = map.higherEntry(three);
293 Map.Entry e2 = map.higherEntry(zero);
296 Map.Entry e3 = map.higherEntry(five);
299 Map.Entry e4 = map.higherEntry(six);
308 Map.Entry e1 = map.floorEntry(three);
[all …]
DConcurrentSkipListSubMapTest.java275 Map.Entry e = (Map.Entry) it.next();
385 Map.Entry e1 = map.lowerEntry(three);
388 Map.Entry e2 = map.lowerEntry(six);
391 Map.Entry e3 = map.lowerEntry(one);
394 Map.Entry e4 = map.lowerEntry(zero);
403 Map.Entry e1 = map.higherEntry(three);
406 Map.Entry e2 = map.higherEntry(zero);
409 Map.Entry e3 = map.higherEntry(five);
412 Map.Entry e4 = map.higherEntry(six);
421 Map.Entry e1 = map.floorEntry(three);
[all …]
/libcore/ojluni/src/main/java/java/lang/
DThreadLocal.java163 ThreadLocalMap.Entry e = map.getEntry(this); in get()
308 static class Entry extends WeakReference<ThreadLocal<?>> { class in ThreadLocal.ThreadLocalMap
312 Entry(ThreadLocal<?> k, Object v) { in Entry() method in ThreadLocal.ThreadLocalMap.Entry
327 private Entry[] table;
366 table = new Entry[INITIAL_CAPACITY]; in ThreadLocalMap()
368 table[i] = new Entry(firstKey, firstValue); in ThreadLocalMap()
380 Entry[] parentTable = parentMap.table; in ThreadLocalMap()
383 table = new Entry[len]; in ThreadLocalMap()
386 Entry e = parentTable[j]; in ThreadLocalMap()
392 Entry c = new Entry(key, value); in ThreadLocalMap()
[all …]
DProcessEnvironment.java251 public Set<Map.Entry<String,String>> entrySet() { in entrySet()
272 for (Map.Entry<Variable,Value> entry : m.entrySet()) { in toEnvironmentBlock()
280 for (Map.Entry<Variable,Value> entry : m.entrySet()) { in toEnvironmentBlock()
303 implements Map.Entry<String,String>
305 private final Map.Entry<Variable,Value> e;
306 public StringEntry(Map.Entry<Variable,Value> e) {this.e = e;} in StringEntry()
321 extends AbstractSet<Map.Entry<String,String>>
323 private final Set<Map.Entry<Variable,Value>> s;
324 public StringEntrySet(Set<Map.Entry<Variable,Value>> s) {this.s = s;} in StringEntrySet()
328 public Iterator<Map.Entry<String,String>> iterator() { in iterator()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DSimpleEntryTest.java25 import java.util.Map.Entry;
34 static class NullEntry implements Entry {
52 Entry entryToPut = (Entry) map.entrySet().iterator().next(); in test_SimpleEntry_Constructor_LEntry()
53 Entry testEntry = new AbstractMap.SimpleEntry(entryToPut); in test_SimpleEntry_Constructor_LEntry()
71 Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1, "test"); in test_SimpleEntry_getKey()
78 Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1, "test"); in test_SimpleEntry_getValue()
85 Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1, "test"); in test_SimpleEntry_setValue()
94 Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1, "test"); in test_SimpleEntry_equals()
97 Entry entryToPut = (Entry) map.entrySet().iterator().next(); in test_SimpleEntry_equals()
98 Entry testEntry = new AbstractMap.SimpleEntry(entryToPut); in test_SimpleEntry_equals()
[all …]
DSimpleImmutableEntryTest.java26 import java.util.Map.Entry;
35 static class NullEntry implements Entry {
53 Entry entryToPut = (Entry) map.entrySet().iterator().next(); in test_SimpleImmutableEntry_Constructor_LEntry()
54 Entry testEntry = new AbstractMap.SimpleImmutableEntry(entryToPut); in test_SimpleImmutableEntry_Constructor_LEntry()
72 Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1, "test"); in test_SimpleImmutableEntry_getKey()
79 Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1, "test"); in test_SimpleImmutableEntry_getValue()
86 Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1, "test"); in test_SimpleImmutableEntry_setValue()
104 Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1, "test"); in test_SimpleImmutableEntry_equals()
107 Entry entryToPut = (Entry) map.entrySet().iterator().next(); in test_SimpleImmutableEntry_equals()
108 Entry testEntry = new AbstractMap.SimpleImmutableEntry(entryToPut); in test_SimpleImmutableEntry_equals()
[all …]
/libcore/ojluni/src/main/java/java/io/
DExpiringCache.java38 private Map<String,Entry> map;
44 static class Entry { class in ExpiringCache
48 Entry(long timestamp, String val) { in Entry() method in ExpiringCache.Entry
67 map = new LinkedHashMap<String,Entry>() { in ExpiringCache()
73 protected boolean removeEldestEntry(Map.Entry<String,ExpiringCache.Entry> eldest) { in ExpiringCache()
83 Entry entry = entryFor(key); in get()
94 Entry entry = entryFor(key); in put()
99 map.put(key, new Entry(System.currentTimeMillis(), val)); in put()
107 private Entry entryFor(String key) { in entryFor()
108 Entry entry = map.get(key); in entryFor()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeTextProvider.java90 import java.util.Map.Entry;
108 …private static final ConcurrentMap<Entry<TemporalField, Locale>, Object> CACHE = new ConcurrentHas…
110 …private static final Comparator<Entry<String, Long>> COMPARATOR = new Comparator<Entry<String, Lon…
112 public int compare(Entry<String, Long> obj1, Entry<String, Long> obj2) {
220 …public Iterator<Entry<String, Long>> getTextIterator(TemporalField field, TextStyle style, Locale … in getTextIterator()
245 public Iterator<Entry<String, Long>> getTextIterator(Chronology chrono, TemporalField field, in getTextIterator()
276 List<Entry<String, Long>> list = new ArrayList<>(map.size()); in getTextIterator()
279 for (Map.Entry<String, Integer> entry : map.entrySet()) { in getTextIterator()
292 for (Map.Entry<String, Integer> entry : map.entrySet()) { in getTextIterator()
297 for (Map.Entry<String, Integer> entry : map.entrySet()) { in getTextIterator()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DLinkedHashMapTest.java51 Map.Entry<String, String> newest = null; in test_getOrDefault()
52 for (Map.Entry<String, String> e : m.entrySet()) { in test_getOrDefault()
72 Map.Entry<String, String> newest = null; in test_putIfAbsent()
73 for (Map.Entry<String, String> e : m.entrySet()) { in test_putIfAbsent()
81 for (Map.Entry<String, String> e : m.entrySet()) { in test_putIfAbsent()
104 Map.Entry<String, String> newest = null; in test_replace$K$V$V()
105 for (Map.Entry<String, String> e : m.entrySet()) { in test_replace$K$V$V()
114 for (Map.Entry<String, String> e : m.entrySet()) { in test_replace$K$V$V()
131 Map.Entry<String, String> newest = null; in test_replace$K$V()
132 for (Map.Entry<String, String> e : m.entrySet()) { in test_replace$K$V()
[all …]
DOldMapEntryTest.java28 Map.Entry me = null;
75 me = (Map.Entry)i.next(); in testSetValue()
89 Map.Entry me1 = (Map.Entry)i.next(); in testEquals()
97 Map.Entry me1 = (Map.Entry)i.next(); in testHashCode()
108 me = (Map.Entry)i.next(); in setUp()
DMapOfTest.java84 Map.Entry[] entries = { entry("duplicateKey", 23), entry("duplicateKey", 42) }; in duplicates_sameKey()
89 Map.Entry[] entries = { entry("duplicateKey", 42), entry("duplicateKey", 42) }; in duplicates_sameEntry()
94 Map.Entry[] entries = { in duplicates_manyElements()
107 assertThrowsNpe(() -> Map.ofEntries((Map.Entry[]) null)); in nullEntries()
108 assertThrowsNpe(() -> Map.ofEntries((Map.Entry) null)); in nullEntries()
109 List<Map.Entry<String, Integer>> sampleEntries = new ArrayList<>(); in nullEntries()
115 Map.Entry[] entries = sampleEntries.subList(0, size).toArray( in nullEntries()
116 (Map.Entry<String, Integer>[]) new Map.Entry[0]); in nullEntries()
134 List<Map.Entry<String, Integer>> sampleEntries = new ArrayList<>(); in manyEntries()
139 Map.Entry[] entries = sampleEntries.subList(0, size).toArray( in manyEntries()
[all …]
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DConcurrentHashMapTest.java55 static class SumKeys implements BiFunction<Map.Entry<Long,Long>,
56 Map.Entry<Long,Long>, Map.Entry<Long,Long>> {
57 public Map.Entry<Long,Long> apply(Map.Entry<Long,Long> x, Map.Entry<Long,Long> y) { in apply()
64 static class IncrementKey implements Function<Map.Entry<Long, Long>, Map.Entry<Long, Long>> {
65 public Map.Entry<Long, Long> apply(Map.Entry<Long, Long> in) { in apply()
72 static class KeyAsDouble implements ToDoubleFunction<Map.Entry<Long, Long>> {
73 public double applyAsDouble(Map.Entry<Long, Long> in) { in applyAsDouble()
78 static class KeyAsInt implements ToIntFunction<Map.Entry<Long, Long>> {
79 public int applyAsInt(Map.Entry<Long, Long> in) { in applyAsInt()
84 static class KeyAsLong implements ToLongFunction<Map.Entry<Long, Long>> {
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DManifestDigester.java43 private HashMap<String, Entry> entries; // key is a UTF-8 string
113 entries = new HashMap<String, Entry>(); in ManifestDigester()
124 new Entry(0, pos.endOfSection + 1, pos.startOfNext, rawBytes)); in ManifestDigester()
171 new Entry(start, sectionLen, sectionLenWithBlank, in ManifestDigester()
194 public static class Entry { class in ManifestDigester
201 public Entry(int offset, int length, in Entry() method in ManifestDigester.Entry
257 public Entry get(String name, boolean oldStyle) { in get()
258 Entry e = entries.get(name); in get()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKSTrustedCertificateEntryTest.java97 KeyStore.Entry.Attribute myAttribute = new KeyStore.Entry.Attribute() { in testGetAttributes()
108 Set<KeyStore.Entry.Attribute> attributeSet = new HashSet<KeyStore.Entry.Attribute>(); in testGetAttributes()
113 Set<KeyStore.Entry.Attribute> returnedAttributeSet = ksTCE.getAttributes(); in testGetAttributes()
DKSSecretKeyEntryTest.java94 KeyStore.Entry.Attribute myAttribute = new KeyStore.Entry.Attribute() { in testGetAttributes()
105 Set<KeyStore.Entry.Attribute> attributeSet = new HashSet<KeyStore.Entry.Attribute>(); in testGetAttributes()
109 Set<KeyStore.Entry.Attribute> returnedAttributeSet = ksSKE.getAttributes(); in testGetAttributes()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DNavigableMap.annotated.java43 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in lowerEntry()
47 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in floorEntry()
51 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in ceilingEntry()
55 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in higherEntry()
59 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in firstEntry()
61 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in lastEntry()
63 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in pollFirstEntry()
65 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in pollLastEntry()

1234567