Class AbstractTrieSetMultimap<K,​V,​C extends java.lang.Iterable<V>,​R extends MultimapNode<K,​V,​C,​R>>

    • Constructor Detail

      • AbstractTrieSetMultimap

        public AbstractTrieSetMultimap​(EqualityComparator<java.lang.Object> cmp)
    • Method Detail

      • getRootNode

        abstract R getRootNode()
      • getCachedSize

        abstract int getCachedSize()
      • getCachedKeySetHashCode

        abstract int getCachedKeySetHashCode()
      • getCachedKeySetSize

        abstract int getCachedKeySetSize()
      • valueToTemporaryBox

        protected abstract Set.Immutable<V> valueToTemporaryBox​(V value)
      • collectionToInternalFormat

        protected abstract C collectionToInternalFormat​(Set.Immutable<V> valueCollection)
      • internalFormatToCollection

        protected abstract Set.Immutable<V> internalFormatToCollection​(C values)
      • tupleHash

        private static final <K,​V> int tupleHash​(int keyHash,
                                                       int valueHash)
      • tupleHash

        private static final <K,​V> int tupleHash​(int keyHash,
                                                       V value)
      • tupleHash

        private static final <K,​V> int tupleHash​(K key,
                                                       V value)
      • tupleHash

        private static final <K,​V,​C extends java.util.Collection<V>> int tupleHash​(int keyHash,
                                                                                               C values)
      • tupleHash

        private static final <K,​V,​C extends java.util.Collection<V>> int tupleHash​(K key,
                                                                                               C values)
      • transformHashCode

        public static final int transformHashCode​(int hash)
      • hashCode

        protected static <K,​V,​C extends java.lang.Iterable<V>,​R extends MultimapNode<K,​V,​C,​R>> int hashCode​(R rootNode)
      • size

        protected static <K,​V,​C extends java.lang.Iterable<V>,​R extends MultimapNode<K,​V,​C,​R>> int size​(R rootNode)
      • keySetHashCode

        protected static <K,​V,​C extends java.lang.Iterable<V>,​R extends MultimapNode<K,​V,​C,​R>> int keySetHashCode​(R rootNode)
      • keySetSize

        protected static <K,​V,​C extends java.lang.Iterable<V>,​R extends MultimapNode<K,​V,​C,​R>> int keySetSize​(R rootNode)
      • checkHashCodeAndSize

        private static final <K,​V> boolean checkHashCodeAndSize​(int targetHash,
                                                                      int targetSize,
                                                                      java.util.Iterator<java.util.Map.Entry<K,​V>> iterator)
      • checkKeySetHashCodeAndSize

        private static final <K> boolean checkKeySetHashCodeAndSize​(int targetHash,
                                                                    int targetSize,
                                                                    java.util.Iterator<K> iterator)
      • nodeIterator

        protected java.util.Iterator<R> nodeIterator()
      • getNodeCount

        protected int getNodeCount()
      • containsKey

        public final boolean containsKey​(java.lang.Object o)
        Specified by:
        containsKey in interface SetMultimap<K,​V>
      • containsValue

        public final boolean containsValue​(java.lang.Object o)
        Specified by:
        containsValue in interface SetMultimap<K,​V>
      • containsEntry

        public final boolean containsEntry​(java.lang.Object o0,
                                           java.lang.Object o1)
        Specified by:
        containsEntry in interface SetMultimap<K,​V>
      • valueIterator

        protected java.util.Iterator<V> valueIterator​(java.util.function.Function<V,​C> converter)
      • entryIterator

        public java.util.Iterator<java.util.Map.Entry<K,​V>> entryIterator()
        Specified by:
        entryIterator in interface SetMultimap<K,​V>
      • nativeEntryIterator

        public java.util.Iterator<java.util.Map.Entry<K,​java.lang.Object>> nativeEntryIterator()
        Description copied from interface: SetMultimap
        Iterates over the raw internal structure. Optional operation.
        Specified by:
        nativeEntryIterator in interface SetMultimap<K,​V>
        Returns:
        native iterator, if supported
      • tupleIterator

        public <T> java.util.Iterator<T> tupleIterator​(java.util.function.BiFunction<K,​V,​T> tupleOf)
        Specified by:
        tupleIterator in interface SetMultimap<K,​V>
      • valueCollectionsSpliterator

        private java.util.Spliterator<C> valueCollectionsSpliterator​(java.util.function.Function<V,​C> converter)
      • valueCollectionsStream

        private java.util.stream.Stream<C> valueCollectionsStream​(java.util.function.Function<V,​C> converter)
      • keySet

        public final java.util.Set<K> keySet()
        Specified by:
        keySet in interface SetMultimap<K,​V>
      • values

        public final java.util.Collection<V> values()
        Specified by:
        values in interface SetMultimap<K,​V>
      • entrySet

        public final java.util.Set<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface SetMultimap<K,​V>
      • hashCode

        public int hashCode()
        Description copied from interface: SetMultimap
        Returns the hash code for this multimap. The hash code is defined to equal the hash of a Set view (rather than to equal the hash code of Map).
        Specified by:
        hashCode in interface SetMultimap<K,​V>
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code for this multimap
      • equals

        public boolean equals​(java.lang.Object other)
        Description copied from interface: SetMultimap
        Compares the specified object for equality against this multimap. The notion of equality is equal to the Set view of a multimap, i.e., all key-value pairs have to equal.
        Specified by:
        equals in interface SetMultimap<K,​V>
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - the object that is checked for equality against this multimap
        Returns:
        true if the specified object is equal to this map
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object