Interface ImmutablePairList<T,U>

Type Parameters:
T - First type
U - Second type
All Superinterfaces:
Collection<Map.Entry<T,U>>, Iterable<Map.Entry<T,U>>, List<Map.Entry<T,U>>, PairList<T,U>, SequencedCollection<Map.Entry<T,U>>
All Known Implementing Classes:
PairLists.ArrayImmutablePairList, PairLists.EmptyImmutablePairList, PairLists.SingletonImmutablePairList

public interface ImmutablePairList<T,U> extends PairList<T,U>
Immutable list of pairs.
  • Method Details

    • of

      static <T, U> ImmutablePairList<T,U> of()
      Creates an empty ImmutablePairList.
    • of

      static <T, U> ImmutablePairList<T,U> of(T t, U u)
      Creates a singleton ImmutablePairList.
    • copyOf

      static <T, U> PairList<T,U> copyOf(T t, U u, Object... rest)
      Creates an ImmutablePairList with one or more entries.
    • copyOf

      static <T, U> ImmutablePairList<T,U> copyOf(Iterable<? extends Map.Entry<T,U>> iterable)
      Creates an ImmutablePairList whose contents are a copy of a given collection.
    • immutable

      default ImmutablePairList<T,U> immutable()
      Description copied from interface: PairList
      Returns an ImmutablePairList whose contents are the same as this PairList.
      Specified by:
      immutable in interface PairList<T,U>