Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for unmodifiableKeySet (0.47 sec)

  1. android/guava-tests/test/com/google/common/graph/MapCacheTest.java

      @Test
      public void testKeySetIterator() {
        mapCache.put("A", "A_value");
        mapCache.put("B", "B_value");
        mapCache.put("C", "C_value");
    
        assertThat(mapCache.unmodifiableKeySet()).hasSize(3);
        for (String key : mapCache.unmodifiableKeySet()) {
          assertThat(mapCache.get(key)).isEqualTo(key + "_value");
        }
      }
    
      @Test
      public void testPutNewValue() {
        assertThat(mapCache.put("key", "value")).isNull();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 26 16:23:26 GMT 2021
    - 3.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/graph/MapIteratorCache.java

    import java.util.Map.Entry;
    import java.util.Set;
    import javax.annotation.CheckForNull;
    
    /**
     * A map-like data structure that wraps a backing map and caches values while iterating through
     * {@link #unmodifiableKeySet()}. By design, the cache is cleared when this structure is mutated. If
     * this structure is never mutated, it provides a thread-safe view of the backing map.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Oct 06 00:47:57 GMT 2021
    - 4.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/graph/MapCacheTest.java

      @Test
      public void testKeySetIterator() {
        mapCache.put("A", "A_value");
        mapCache.put("B", "B_value");
        mapCache.put("C", "C_value");
    
        assertThat(mapCache.unmodifiableKeySet()).hasSize(3);
        for (String key : mapCache.unmodifiableKeySet()) {
          assertThat(mapCache.get(key)).isEqualTo(key + "_value");
        }
      }
    
      @Test
      public void testPutNewValue() {
        assertThat(mapCache.put("key", "value")).isNull();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 26 16:23:26 GMT 2021
    - 3.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/StandardNetwork.java

        this.edgeToReferenceNode = new MapIteratorCache<>(edgeToReferenceNode);
      }
    
      @Override
      public Set<N> nodes() {
        return nodeConnections.unmodifiableKeySet();
      }
    
      @Override
      public Set<E> edges() {
        return edgeToReferenceNode.unmodifiableKeySet();
      }
    
      @Override
      public boolean isDirected() {
        return isDirected;
      }
    
      @Override
      public boolean allowsParallelEdges() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/StandardValueGraph.java

                : new MapIteratorCache<N, GraphConnections<N, V>>(nodeConnections);
        this.edgeCount = checkNonNegative(edgeCount);
      }
    
      @Override
      public Set<N> nodes() {
        return nodeConnections.unmodifiableKeySet();
      }
    
      @Override
      public boolean isDirected() {
        return isDirected;
      }
    
      @Override
      public boolean allowsSelfLoops() {
        return allowsSelfLoops;
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 6.1K bytes
    - Viewed (0)
Back to top