info.informatica.util
Class LabeledContainer<T>

java.lang.Object
  extended by info.informatica.util.LabeledContainer<T>
All Implemented Interfaces:
Serializable, Comparable

public class LabeledContainer<T>
extends Object
implements Comparable, Serializable

Labeled object container.

The label uniquely identifies the object, so keep in mind that two containers are equal if their labels are equal.

Version:
2.00
Author:
amengual at informatica dot info
See Also:
Serialized Form

Nested Class Summary
static class LabeledContainer.NameComp
           
static class LabeledContainer.ObjectComp<C extends Comparator<C>>
           
static class LabeledContainer.RevNameComp
           
static class LabeledContainer.RevObjectComp<C extends Comparator<C>>
           
 
Constructor Summary
LabeledContainer(String label, T o)
           
LabeledContainer(T o)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object obj)
           
 String getName()
           
 T getObject()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LabeledContainer

public LabeledContainer(T o)

LabeledContainer

public LabeledContainer(String label,
                        T o)
Method Detail

getName

public String getName()

getObject

public T getObject()

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable