Class ImmutableLinkedHashMap<K,​V>

    • Constructor Detail

      • ImmutableLinkedHashMap

        public ImmutableLinkedHashMap​(Map<K,​V> map)
        Parameters:
        map - Map<K,V>; the map to use for the immutable map.
      • ImmutableLinkedHashMap

        public ImmutableLinkedHashMap​(Map<K,​V> map,
                                      Immutable copyOrWrap)
        Parameters:
        map - Map<K,V>; the map to use for the immutable map.
        copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collection
      • ImmutableLinkedHashMap

        public ImmutableLinkedHashMap​(ImmutableAbstractMap<K,​V> immutableMap)
        Parameters:
        immutableMap - ImmutableAbstractMap<K,V>; the map to use for the immutable map.
      • ImmutableLinkedHashMap

        public ImmutableLinkedHashMap​(ImmutableAbstractMap<K,​V> immutableMap,
                                      Immutable copyOrWrap)
        Parameters:
        immutableMap - ImmutableAbstractMap<K,V>; the map to use for the immutable map.
        copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collection
    • Method Detail

      • toMap

        public final Map<K,​V> toMap()
        Returns a modifiable copy of this immutable map.
        Returns:
        a modifiable copy of this immutable map.
      • keySet

        public final ImmutableSet<K> keySet()
        Returns a Set view of the keys contained in this map.
        Returns:
        an immutable set of the keys contained in this map
      • toString

        public final String toString()
        Force to redefine toString.
        Specified by:
        toString in interface ImmutableMap<K,​V>
        Overrides:
        toString in class Object
        Returns:
        String; a description of this immutable map