Package ptolemy.domains.metroII.kernel
Class Pair<F,S>
- java.lang.Object
-
- ptolemy.domains.metroII.kernel.Pair<F,S>
-
public class Pair<F,S> extends java.lang.Object
Pair is a container for a pair of values, which may be of different types (F and S). The individual values can be accessed through its public methods.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Liangpeng Guo
- Pt.AcceptedRating:
- Red (glp)
- Pt.ProposedRating:
- Red (glp)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description F
getFirst()
Gets the first element.S
getSecond()
Gets the second element.void
setFirst(F first)
Sets the first element.void
setSecond(S second)
Sets the second element.java.lang.String
toString()
Converts to a string.
-
-
-
Method Detail
-
setFirst
public void setFirst(F first)
Sets the first element.- Parameters:
first
- Value to be assigned to the first element.- See Also:
getFirst()
-
setSecond
public void setSecond(S second)
Sets the second element.- Parameters:
second
- Value to be assigned to the second element.- See Also:
getSecond()
-
toString
public java.lang.String toString()
Converts to a string.- Overrides:
toString
in classjava.lang.Object
-
getFirst
public F getFirst()
Gets the first element.- Returns:
- The first element in the pair.
- See Also:
setFirst(F)
-
getSecond
public S getSecond()
Gets the second element.- Returns:
- The second element in the pair.
- See Also:
setSecond(S)
-
-