Package net.cscott.jutil
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.
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:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Constructor Details
-
PairList
Deprecated.
-
-
Method Details
-
left
Deprecated.Return the left element of the pair (head). -
right
Deprecated.Return the right element of the pair (tail). -
size
public int size()Deprecated.- Specified by:
sizein interfaceCollection<A>- Specified by:
sizein interfaceList<A>- Specified by:
sizein classAbstractCollection<Object>
-
get
Deprecated. -
set
Deprecated.
-
Pair, an immutable record whosePair.left()andPair.right()replace the methods of the same name. Unlike aDefault.PairList, aPairis not aList, and itshashCode()andtoString()differ.