|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.util.AbstractPair
Implements an ordered pair, two associated Object
s.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
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.
Field Summary | |
protected static java.lang.String |
beginChar
|
java.lang.Object |
component1
The first component of the pair. |
java.lang.Object |
component2
The second component of the pair. |
protected static java.lang.String |
endChar
|
protected static java.lang.String |
separatorChar
|
protected static java.lang.String |
separators
|
Constructor Summary | |
AbstractPair()
Constructs an AbstractPair object. |
|
AbstractPair(java.lang.Object component1,
java.lang.Object component2)
Constructs a new pair, with component1 as its first and
component2 as its second component. |
Method Summary | |
boolean |
elementsEqual()
|
boolean |
equals(java.lang.Object o)
Compares the specified object with this AbstractPair for
equality. |
int |
hashCode()
Returns a hash code value of this pair. |
java.lang.String |
toString()
Returns a string representation of this pair. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final java.lang.String beginChar
protected static final java.lang.String endChar
protected static final java.lang.String separatorChar
protected static final java.lang.String separators
public java.lang.Object component1
public java.lang.Object component2
Constructor Detail |
public AbstractPair()
public AbstractPair(java.lang.Object component1, java.lang.Object component2)
component1
as its first and
component2
as its second component.Method Detail |
public boolean equals(java.lang.Object o)
AbstractPair
for
equality.
Returns true
if the given object is also a pair with the same
components, false
otherwise.
equals
in class java.lang.Object
true
if the given object is also a pair with the same
components, false
otherwise.public boolean elementsEqual()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |