com.mindfusion.diagramming.jlayout
Class Pair

java.lang.Object
  extended by com.mindfusion.diagramming.jlayout.Pair
All Implemented Interfaces:
java.lang.Comparable<Pair>

public class Pair
extends java.lang.Object
implements java.lang.Comparable<Pair>

Represents a coupling between two arbitrary objects.


Constructor Summary
Pair()
          Initializes a new instance of the Pair class.
Pair(java.lang.Object obj1, java.lang.Object obj2)
          Initializes a new instance of the Pair class.
 
Method Summary
 int compareTo(Pair pair)
          Comparable.compareTo implementation.
 boolean equals(java.lang.Object obj)
          Object.equals override.
 java.lang.Object getFirstObject()
          Gets the first pair object.
 java.util.ArrayList<java.lang.Object> getPairElements()
          Gets the elements of the pair as an ArrayList.
 java.lang.Object getSecondObject()
          Gets the second pair object.
 int hashCode()
          Object.GetHashCode override.
 void setFirstObject(java.lang.Object value)
          Sets the first pair object.
 void setSecondObject(java.lang.Object value)
          Sets the second pair object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair()
Initializes a new instance of the Pair class.


Pair

public Pair(java.lang.Object obj1,
            java.lang.Object obj2)
Initializes a new instance of the Pair class.

Method Detail

compareTo

public int compareTo(Pair pair)
Comparable.compareTo implementation.

Specified by:
compareTo in interface java.lang.Comparable<Pair>

equals

public boolean equals(java.lang.Object obj)
Object.equals override.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Object.GetHashCode override.

Overrides:
hashCode in class java.lang.Object

getPairElements

public java.util.ArrayList<java.lang.Object> getPairElements()
Gets the elements of the pair as an ArrayList.


getFirstObject

public java.lang.Object getFirstObject()
Gets the first pair object.


setFirstObject

public void setFirstObject(java.lang.Object value)
Sets the first pair object.


getSecondObject

public java.lang.Object getSecondObject()
Gets the second pair object.


setSecondObject

public void setSecondObject(java.lang.Object value)
Sets the second pair object.