Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
VCollections – Release 1
Interface org.violetlib.collections.IMap
Inherited members: ShowHide
Deprecated: ShowHide
org.violetlib.collections

Interface IMap<K,V>

  • Type Parameters:
    K - The type of the keys.
    V - The type of the values.
    All Superinterfaces:
    IIterable<Binding<K,V>>, Iterable<Binding<K,V>>
    public interface IMap<K,V> extends IIterable<Binding<K,V>>
    An immutable map. Null keys and values are not permitted.
    • Nested Classes 
      Modifier and Type Interface and Description
      Ordinary member indicator FVisitor<K,V,R> Reveal DetailHide Detail
      static interface FVisitor<K,V,R>
       
      static interface FVisitor<K,V,R>
      Ordinary member indicator Visitor<K,V> Reveal DetailHide Detail
      static interface Visitor<K,V>
       
      static interface Visitor<K,V>
    • Fields 
      Modifier and Type Field and Description
      Ordinary member indicator ORDERED Reveal DetailHide Detail
      static Option ORDERED
       
      static final Option ORDERED
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator builder Reveal DetailHide Detail
      static <K,V> MapBuilder<K,V> builder()
      Return a new map builder.
      static <K,V> MapBuilder<K,V> builder()
      Return a new map builder.
      Ordinary member indicator builder Reveal DetailHide Detail
      static <K,V> MapBuilder<K,V> builder(Option option)
      Return a new map builder.
      static <K,V> MapBuilder<K,V> builder(Option option)
      Return a new map builder.
      Parameters:
      option - If option is ORDERED, the iteration order of the map will be based on the order in which the keys were first added.
      Ordinary member indicator cast Reveal DetailHide Detail
      static <K,V> IMap<K,V> cast(IMap<?,?> o)
      Cast a map to a specific type.
      static <K,V> IMap<K,V> cast(IMap<?,?> o)
      Cast a map to a specific type. This method is no more reliable than an explicit type cast, but it prevents the warning.
      Ordinary member indicator create Reveal DetailHide Detail
      static <K,V> IMap<K,V> create(Map<? extends K,? extends V> map)
      Return a map containing the specified bindings.
      static <K,V> IMap<K,V> create(Map<? extends K,? extends V> map)
      Return a map containing the specified bindings.
      Ordinary member indicator createWeak Reveal DetailHide Detail
      static <K,V> IMap<K,V> createWeak(Map<? extends K,? extends V> map)
      Return a map containing the specified bindings using weak references to the keys.
      static <K,V> IMap<K,V> createWeak(Map<? extends K,? extends V> map)
      Return a map containing the specified bindings using weak references to the keys.
      Ordinary member indicator empty Reveal DetailHide Detail
      static <K,V> IMap<K,V> empty()
      Return a map containing no bindings.
      static <K,V> IMap<K,V> empty()
      Return a map containing no bindings.
      Inherited member indicator from Reveal DetailHide Detail
      static <T> IIterable<T> from(Iterable<T> it)
      Create an IIterable from an Iterable.
      static <T> IIterable<T> from(Iterable<T> it)
      Description copied from interface: IIterable
      Create an IIterable from an Iterable. The iterators produced by the returned IIterable will throw a runtime exception if an iterator produced by the Iterable returns a null value.
      Parameters:
      it - The source iterable.
      Ordinary member indicator mapListBuilder Reveal DetailHide Detail
      static <K,V> UnorderedMapListBuilder<K,V> mapListBuilder()
      Return a new map list builder.
      static <K,V> UnorderedMapListBuilder<K,V> mapListBuilder()
      Return a new map list builder.
      Ordinary member indicator mapListBuilder Reveal DetailHide Detail
      static <K,V> MapListBuilder<K,V> mapListBuilder(Option option)
      Return a new map list builder.
      static <K,V> MapListBuilder<K,V> mapListBuilder(Option option)
      Return a new map list builder.
      Parameters:
      option - If option is ORDERED, the iteration order of the map list will be based on the order in which keys and elements were first added.
      Ordinary member indicator mapSetBuilder Reveal DetailHide Detail
      static <K,V> MapSetBuilder<K,V> mapSetBuilder()
      Return a new map set builder.
      static <K,V> MapSetBuilder<K,V> mapSetBuilder()
      Return a new map set builder.
      Ordinary member indicator mapSetBuilder Reveal DetailHide Detail
      static <K,V> MapSetBuilder<K,V> mapSetBuilder(Option option)
      Return a new map set builder.
      static <K,V> MapSetBuilder<K,V> mapSetBuilder(Option option)
      Return a new map set builder.
      Parameters:
      option - If option is ORDERED, the iteration order of the map set will be based on the order in which keys and elements were first added.
      Ordinary member indicator of Reveal DetailHide Detail
      static <K,V> IMap<K,V> of(Binding<? extends K,? extends V> binding)
      Return a map containing one binding.
      static <K,V> IMap<K,V> of(Binding<? extends K,? extends V> binding)
      Return a map containing one binding.
      Ordinary member indicator singleton Reveal DetailHide Detail
      static <K,V> IMap<K,V> singleton(K key, V value)
      Return a map containing one binding.
      static <K,V> IMap<K,V> singleton(K key, V value)
      Return a map containing one binding.
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator asJavaMap Reveal DetailHide Detail
      Map<K,V> asJavaMap()
      Return a new Java map containing the bindings of this map.
      Map<K,V> asJavaMap()
      Return a new Java map containing the bindings of this map.
      Ordinary member indicator containsKey Reveal DetailHide Detail
      abstract boolean containsKey(Object key)
       
      boolean containsKey(Object key)
      Ordinary member indicator extending Reveal DetailHide Detail
      abstract IMap<K,V> extending(IMap<K,V> bindings)
      Return a map with possibly additional or updated bindings.
      IMap<K,V> extending(IMap<K,V> bindings)
      Return a map with possibly additional or updated bindings.
      Parameters:
      bindings - The bindings to be added to or to replace bindings in this map.
      Returns:
      A map with the existing bindings from this map, updated by the specified bindings.
      Ordinary member indicator extending Reveal DetailHide Detail
      abstract IMap<K,V> extending(K key, V value)
      Return a map with a possibly updated binding for the specified key.
      IMap<K,V> extending(K key, V value)
      Return a map with a possibly updated binding for the specified key. The returned map will have the same bindings for other keys as this map.
      Parameters:
      key - The key whose value is specified.
      value - The value to be associated with key. If null, the returned map will have no binding for key.
      Returns:
      A map with the existing bindings from this map, plus the specified binding (or lack thereof) for the key key.
      Ordinary member indicator find Reveal DetailHide Detail
      abstract <R> R find(IMap.FVisitor<K,V,R> visitor, R defaultResult)
       
      <R> R find(IMap.FVisitor<K,V,R> visitor, R defaultResult)
      Inherited member indicator forEach Reveal DetailHide Detail
      void forEach(Consumer<? super T> arg0)
       
      void forEach(Consumer<? super T> arg0)
      Ordinary member indicator get Reveal DetailHide Detail
      abstract V get(K key)
      Return the value associated with the specified key.
      V get(K key)
      Return the value associated with the specified key.
      Parameters:
      key - The key.
      Returns:
      the value associated with key, or null if none.
      Ordinary member indicator getRequired Reveal DetailHide Detail
      V getRequired(K key)
       
      V getRequired(K key)
      Ordinary member indicator isEmpty Reveal DetailHide Detail
      abstract boolean isEmpty()
      Return true if and only if the map contains no keys.
      boolean isEmpty()
      Return true if and only if the map contains no keys.
      Inherited member indicator iterator Reveal DetailHide Detail
      abstract IIterator<T> iterator()
      Returns an iterator over non-null elements of type T.
      IIterator<T> iterator()
      Description copied from interface: IIterable
      Returns an iterator over non-null elements of type T.
      Specified by:
      iterator in interface Iterable<T>
      Returns:
      an Iterator.
      Ordinary member indicator keySet Reveal DetailHide Detail
      abstract ISet<K> keySet()
       
      ISet<K> keySet()
      Ordinary member indicator size Reveal DetailHide Detail
      abstract int size()
      Return the number of keys in the map.
      int size()
      Return the number of keys in the map.
      Inherited member indicator spliterator Reveal DetailHide Detail
      Spliterator<T> spliterator()
       
      Spliterator<T> spliterator()
      Ordinary member indicator subset Reveal DetailHide Detail
      IMap<K,V> subset(ISet<K> keys)
      Return a map containing the bindings for the specified keys (if defined).
      IMap<K,V> subset(ISet<K> keys)
      Return a map containing the bindings for the specified keys (if defined).
      Parameters:
      keys - The keys whose bindings are to be returned.
      Returns:
      A map containing the existing bindings for keys in this map.
      Ordinary member indicator values Reveal DetailHide Detail
      abstract ISet<V> values()
       
      ISet<V> values()
      Ordinary member indicator visit Reveal DetailHide Detail
      abstract void visit(IMap.Visitor<K,V> visitor)
       
      void visit(IMap.Visitor<K,V> visitor)