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>

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 <@NonNull T, @NonNull U> ImmutablePairList<T,U> copyOf(Iterable<? extends Map.Entry<@NonNull T,@NonNull 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>
    • subList

      ImmutablePairList<T,U> subList(int fromIndex, int toIndex)
      Specified by:
      subList in interface List<T>
      Specified by:
      subList in interface PairList<T,U>