fulmine.util.reference
Class DualValue<FIRST,SECOND>

java.lang.Object
  extended by fulmine.util.reference.DualValue<FIRST,SECOND>
Type Parameters:
FIRST - the first type
SECOND - the second type
Direct Known Subclasses:
TriValue

public class DualValue<FIRST,SECOND>
extends Object

Type safe object for holding 2 objects.

Author:
Ramon Servadei

Field Summary
protected  Values values
          Holds the values
 
Constructor Summary
  DualValue(FIRST first, SECOND second)
           
protected DualValue(Values values)
           
 
Method Summary
 boolean equals(Object obj)
           
 FIRST getFirst()
          Get the first object from the constructor
 SECOND getSecond()
          Get the second object from the constructor
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

values

protected Values values
Holds the values

Constructor Detail

DualValue

public DualValue(FIRST first,
                 SECOND second)

DualValue

protected DualValue(Values values)
Method Detail

getFirst

public FIRST getFirst()
Get the first object from the constructor

Returns:
the first object this was constructed with

getSecond

public SECOND getSecond()
Get the second object from the constructor

Returns:
the second object this was constructed with

toString

public final String toString()
Overrides:
toString in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2007-2009. All Rights Reserved.