Package edu.cmu.tetrad.sem
Class ParameterPair
java.lang.Object
edu.cmu.tetrad.sem.ParameterPair
- All Implemented Interfaces:
TetradSerializable
,Serializable
Implements an ordered pair of objects (a, b) suitable for storing in HashSets. The hashCode() method is overridden
so that the hashcode of (a1, b1) == the hashcode of (a2, b2) just in case a1 == a2 and b1 == b2.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParameterPair
(Parameter a, Parameter b) Constructs a new ordered pair (a, b). -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests whether this object pair is equal to a second object pair by looking to see whether each element a and b is equal to its corresponding element.getA()
Method getNumObjectsgetB()
Method getNumObjectsint
hashCode()
static ParameterPair
Generates a simple exemplar of this class to test serialization.
-
Constructor Details
-
ParameterPair
Constructs a new ordered pair (a, b).- Parameters:
a
- the first element of the ordered pair.b
- the second element of the ordered pair.
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
getA
Method getNumObjects- Returns:
- the first element of the ordered pair.
-
getB
Method getNumObjects- Returns:
- the second element of the ordered pair.
-
equals
Tests whether this object pair is equal to a second object pair by looking to see whether each element a and b is equal to its corresponding element. -
hashCode
public int hashCode()
-