
A - the type of the first element in pair.B - the type of the second element in the pair.public class Pair<A,B> extends Object implements Serializable
Collection that stores exactly 2 non-null objects and is not mutable). They respect
equals and may be used as indices or map keys. Note that they do not protect from malevolent behavior: if one or another object in the tuple is mutable, then it can be changed with the usual bad effects.
Copyright © 2015 University of Glasgow. All rights reserved.