Class Default.PairList<A,B>

All Implemented Interfaces:
Serializable, Iterable<Object>, Collection<Object>, List<Object>, SequencedCollection<Object>
Enclosing class:
Default

@Deprecated(since="2.0") public static class Default.PairList<A,B> extends AbstractList<Object> implements Serializable
Deprecated.
Use Pair, an immutable record whose Pair.left() and Pair.right() replace the methods of the same name. Unlike a Default.PairList, a Pair is not a List, and its hashCode() and toString() differ.
Pairs, implemented as a List. The Default.PairList implements hashCode() and equals() "properly" so they can be used as keys in hashtables and etc. They are implemented as mutable lists of fixed size 2. Note that the hashCode() implementation differs from pairs implemented as Map.Entrys; the parameterization is different as well.
See Also:
  • Constructor Details

    • PairList

      public PairList(A left, B right)
      Deprecated.
  • Method Details