at.tuwien.ifs.somtoolbox.layers
Class UnitPair

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.layers.UnitPair

public class UnitPair
extends Object

A pair of units. Note: for the equality of two pairs, the ordering of their units is NOT relevant.

Version:
$Id: UnitPair.java 3583 2010-05-21 10:07:41Z mayer $
Author:
Stefan Ruemmele, Christian Kapeller, Frank Pourvoyeur, Rudolf Mayer

Field Summary
private  Unit first
           
private  Unit second
           
 
Constructor Summary
UnitPair(Unit first, Unit second)
           
 
Method Summary
 boolean equals(Object obj)
          Returns true, if both pairs contain the same units regardless of their ordering.
 Unit getFirst()
           
 Unit getSecond()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

first

private Unit first

second

private Unit second
Constructor Detail

UnitPair

public UnitPair(Unit first,
                Unit second)
Method Detail

equals

public boolean equals(Object obj)
Returns true, if both pairs contain the same units regardless of their ordering.

Overrides:
equals in class Object

getFirst

public Unit getFirst()

getSecond

public Unit getSecond()

toString

public String toString()
Overrides:
toString in class Object