com.virtuosotechnologies.lib.base
Class UniqueHierarchicalType

java.lang.Object
  extended bycom.virtuosotechnologies.lib.base.UniqueObject
      extended bycom.virtuosotechnologies.lib.base.BasicEnumeratedType
          extended bycom.virtuosotechnologies.lib.base.UniqueHierarchicalType
All Implemented Interfaces:
Comparable, HierarchicalType
Direct Known Subclasses:
CommandNodeFlavor, FragmentedString.FragmentType, PlatformID

public class UniqueHierarchicalType
extends BasicEnumeratedType
implements HierarchicalType

A basic UniqueObject-based implementation of a HierarchicalType. Most clients should subclass this class for type safety.


Constructor Summary
UniqueHierarchicalType(String description)
          Constructs a new type that doesn't extend anything.
UniqueHierarchicalType(String description, HierarchicalType base1)
          Constructs a new type that extends the given type.
UniqueHierarchicalType(String description, HierarchicalType[] bases)
          Constructs a new type that extends the given types.
UniqueHierarchicalType(String description, HierarchicalType base1, HierarchicalType base2)
          Constructs a new type that extends the given two types.
 
Method Summary
 boolean equalsOrExtends(HierarchicalType type)
          Returns true if and only if this HierarchicalType the same as or an extension of the given parameter.
 Iterator getParents()
          Get an interator over the immediate parents
 
Methods inherited from class com.virtuosotechnologies.lib.base.BasicEnumeratedType
compareTo
 
Methods inherited from class com.virtuosotechnologies.lib.base.UniqueObject
equals, getUniqueObjectID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniqueHierarchicalType

public UniqueHierarchicalType(String description)
Constructs a new type that doesn't extend anything.

Parameters:
description - a description String.

UniqueHierarchicalType

public UniqueHierarchicalType(String description,
                              HierarchicalType[] bases)
Constructs a new type that extends the given types.

Parameters:
description - a description String.
bases - base types that this type extends.

UniqueHierarchicalType

public UniqueHierarchicalType(String description,
                              HierarchicalType base1)
Constructs a new type that extends the given type.

Parameters:
description - a description String.
base1 - base type that this type extends.

UniqueHierarchicalType

public UniqueHierarchicalType(String description,
                              HierarchicalType base1,
                              HierarchicalType base2)
Constructs a new type that extends the given two types.

Parameters:
description - a description String.
base1 - base type that this type extends.
base2 - base type that this type extends.
Method Detail

equalsOrExtends

public boolean equalsOrExtends(HierarchicalType type)
Returns true if and only if this HierarchicalType the same as or an extension of the given parameter.

Specified by:
equalsOrExtends in interface HierarchicalType
Parameters:
type - a type to test
Returns:
true if this type equals or extends the given type

getParents

public Iterator getParents()
Get an interator over the immediate parents

Specified by:
getParents in interface HierarchicalType
Returns:
an Iterator over the immediate parents. The remove() method of the iterator is not implemented.