com.vinculumtech.platform.util
Class BinaryKey

java.lang.Object
  extended bycom.vinculumtech.platform.util.BinaryKey

public class BinaryKey
extends java.lang.Object

The BinaryKey class provides a mechanism for two Objects to act as a single key in a Map. If constructed with orderSignificant as false, any other BinaryKey instance with the equal objects in alternate orders will equal the first one.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/platform/util/BinaryKey.java#4 $

Constructor Summary
BinaryKey(java.lang.Object lhs, java.lang.Object rhs)
          No values may be null.
BinaryKey(java.lang.Object lhs, java.lang.Object rhs, boolean orderSignificant)
          No values may be null.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.Object getLhs()
           
 java.lang.Object getRhs()
           
 int hashCode()
           
 boolean isOrderSignificant()
           
 void setLhs(java.lang.Object lhs)
           
 void setOrderSignificant(boolean orderSignificant)
           
 void setRhs(java.lang.Object rhs)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryKey

public BinaryKey(java.lang.Object lhs,
                 java.lang.Object rhs)
No values may be null.

Parameters:
lhs -
rhs -

BinaryKey

public BinaryKey(java.lang.Object lhs,
                 java.lang.Object rhs,
                 boolean orderSignificant)
No values may be null.

Parameters:
lhs -
rhs -
orderSignificant - true if order is not significant for equality
Method Detail

getLhs

public java.lang.Object getLhs()

setLhs

public void setLhs(java.lang.Object lhs)

getRhs

public java.lang.Object getRhs()

setRhs

public void setRhs(java.lang.Object rhs)

isOrderSignificant

public boolean isOrderSignificant()

setOrderSignificant

public void setOrderSignificant(boolean orderSignificant)

equals

public boolean equals(java.lang.Object object)

hashCode

public int hashCode()


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.