org.opencyc.util
Class Pair

java.lang.Object
  |
  +--org.opencyc.util.AbstractPair
        |
        +--org.opencyc.util.Pair
All Implemented Interfaces:
java.io.Serializable

public class Pair
extends AbstractPair

Implements an ordered pair, two associated Objects.

Author:
Bjørn Aldag

Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

the license

www.opencyc.org

OpenCyc at SourceForge

THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

See Also:
Serialized Form

Fields inherited from class org.opencyc.util.AbstractPair
beginChar, component1, component2, endChar, separatorChar, separators
 
Constructor Summary
Pair()
          Constructs a new Pair object.
Pair(java.lang.Object component1, java.lang.Object component2)
          Constructs a new Pair object given two components.
 
Method Summary
static Pair parsePair(java.lang.String pairString)
          Returns a Pair representation of a String.
 
Methods inherited from class org.opencyc.util.AbstractPair
elementsEqual, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair()
Constructs a new Pair object.

Pair

public Pair(java.lang.Object component1,
            java.lang.Object component2)
Constructs a new Pair object given two components.
Parameters:
component1 - the first component of the Pair
component2 - the second component of the Pair
Method Detail

parsePair

public static Pair parsePair(java.lang.String pairString)
Returns a Pair representation of a String.
Parameters:
pairString - the string to be parsed into a Pair object
Returns:
a Pair representation of a String.
Throws:
DataFormatException - when the given string is not parsable to a Pair