- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 409 for getvalue (0.2 sec)
-
guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java
assertEquals("test", entry.getValue()); assertThrows(UnsupportedOperationException.class, () -> entry.setValue(1)); } public void testPutAndGetInstance() { assertNull(map.putInstance(Integer.class, Integer.valueOf(5))); Integer oldValue = map.putInstance(Integer.class, Integer.valueOf(7)); assertEquals(5, (int) oldValue); Integer newValue = map.getInstance(Integer.class);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 7.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
backingMap.put(element, occurrences); size += occurrences; return 0; } int oldCount = backingMap.getValue(entryIndex); long newCount = (long) oldCount + (long) occurrences; checkArgument(newCount <= Integer.MAX_VALUE, "too many occurrences: %s", newCount); backingMap.setValue(entryIndex, (int) newCount); size += occurrences; return oldCount; } @CanIgnoreReturnValue @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Mar 06 16:06:58 GMT 2023 - 8.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableRangeMap.java
ImmutableList.Builder<V> valuesBuilder = new ImmutableList.Builder<>(map.size()); for (Entry<Range<K>, ? extends V> entry : map.entrySet()) { rangesBuilder.add(entry.getKey()); valuesBuilder.add(entry.getValue()); } return new ImmutableRangeMap<>(rangesBuilder.build(), valuesBuilder.build()); } /** Returns a new builder for an immutable range map. */
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 14.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableEntry.java
} @Override @ParametricNullness public final K getKey() { return key; } @Override @ParametricNullness public final V getValue() { return value; } @Override @ParametricNullness public final V setValue(@ParametricNullness V value) { throw new UnsupportedOperationException(); } private static final long serialVersionUID = 0;
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Jan 19 21:29:44 GMT 2023 - 1.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/MapMakerInternalMap.java
public int hashCode() { // Cannot use key and value equivalence return key.hashCode() ^ value.hashCode(); } @Override public V setValue(V newValue) { V oldValue = put(key, newValue); value = newValue; // only if put succeeds return oldValue; } } final class EntryIterator extends HashIterator<Entry<K, V>> { @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 91.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/JdkBackedImmutableMap.java
// requireNonNull is safe because the first `n` elements have been filled in. entryArray[i] = makeImmutable(requireNonNull(entryArray[i])); K key = entryArray[i].getKey(); V value = entryArray[i].getValue(); V oldValue = delegateMap.put(key, value); if (oldValue != null) { if (throwIfDuplicateKeys) { throw conflictException("key", entryArray[i], entryArray[i].getKey() + "=" + oldValue); }
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Nov 30 21:54:06 GMT 2023 - 4.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
* currentEntry (which we never subsequently clear). */ int frequency = requireNonNull(currentEntry).getValue().get(); if (frequency <= 0) { throw new ConcurrentModificationException(); } if (currentEntry.getValue().addAndGet(-1) == 0) { entryIterator.remove(); } size--; canRemove = false; } } @Override
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Mar 06 16:06:58 GMT 2023 - 10.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/JdkBackedImmutableBiMap.java
V oldValue = forwardDelegate.putIfAbsent(e.getKey(), e.getValue()); if (oldValue != null) { throw conflictException("key", e.getKey() + "=" + oldValue, entryArray[i]); } K oldKey = backwardDelegate.putIfAbsent(e.getValue(), e.getKey()); if (oldKey != null) { throw conflictException("value", oldKey + "=" + e.getValue(), entryArray[i]); } }
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Nov 30 21:54:06 GMT 2023 - 4.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/AbstractBiMap.java
return delegate; } @Override public V setValue(V value) { checkValue(value); // Preconditions keep the map and inverse consistent. checkState(entrySet().contains(this), "entry no longer in map"); // similar to putInBothMaps, but set via entry if (Objects.equal(value, getValue())) { return value; }
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Aug 24 01:40:03 GMT 2023 - 14.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/FilteredEntryMultimap.java
Entry<K, Collection<V>> entry = entryIterator.next(); K key = entry.getKey(); Collection<V> collection = filterCollection(entry.getValue(), new ValuePredicate(key)); if (!collection.isEmpty() && predicate.apply(Maps.immutableEntry(key, collection))) { if (collection.size() == entry.getValue().size()) { entryIterator.remove(); } else { collection.clear(); } changed = true;
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Wed Oct 06 00:47:57 GMT 2021 - 11.9K bytes - Viewed (0)