org.nakedobjects.metamodel.facets.ordering
Class OrderSet

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.ordering.OrderSet
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
DeweyOrderSet, SimpleOrderSet

public class OrderSet
extends java.lang.Object
implements java.lang.Comparable


Field Summary
protected  java.util.SortedSet<DeweyOrderSet> childOrderSets
          A staging area until we are ready to add the child sets to the collection of elements owned by the superclass.
 
Constructor Summary
OrderSet(java.lang.String groupFullName)
           
 
Method Summary
protected  void addAll(java.util.SortedSet<DeweyOrderSet> sortedMembers)
           
protected  void addChild(DeweyOrderSet childOrderSet)
           
protected  void addElement(java.lang.Object element)
           
 java.util.List<DeweyOrderSet> children()
           
 int compareTo(java.lang.Object o)
          Natural ordering is to compare by getGroupFullName().
 int compareTo(OrderSet o)
           
protected  void copyOverChildren()
           
 java.util.List<java.lang.Object> elementList()
          Returns a copy of the elements, in sequence.
 java.util.Enumeration<java.lang.Object> elements()
           
 java.lang.String getGroupFullName()
          The group name exactly as it was supplied in the constructor (analogous to a fully qualified file name).
 java.lang.String getGroupName()
          Last component of the comma-separated group name supplied in the constructor (analogous to the file name extracted from a fully qualified file name).
 java.lang.String getGroupPath()
          Represents the parent groups, derived from the group name supplied in the constructor (analogous to the directory portion of a fully qualified file name).
 OrderSet getParent()
           
protected  void setParent(DeweyOrderSet parent)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

childOrderSets

protected java.util.SortedSet<DeweyOrderSet> childOrderSets
A staging area until we are ready to add the child sets to the collection of elements owned by the superclass.

Constructor Detail

OrderSet

public OrderSet(java.lang.String groupFullName)
Method Detail

getGroupName

public java.lang.String getGroupName()
Last component of the comma-separated group name supplied in the constructor (analogous to the file name extracted from a fully qualified file name).

For example, if supplied abc,def,ghi in the constructor, then this will return ghi.

Returns:

getGroupFullName

public java.lang.String getGroupFullName()
The group name exactly as it was supplied in the constructor (analogous to a fully qualified file name).

For example, if supplied abc,def,ghi in the constructor, then this will return the same string abc,def,ghi.

Returns:

getGroupPath

public java.lang.String getGroupPath()
Represents the parent groups, derived from the group name supplied in the constructor (analogous to the directory portion of a fully qualified file name).

For example, if supplied abc,def,ghi in the constructor, then this will return abc,def.

Returns:

setParent

protected void setParent(DeweyOrderSet parent)

getParent

public OrderSet getParent()

addChild

protected void addChild(DeweyOrderSet childOrderSet)

children

public java.util.List<DeweyOrderSet> children()

copyOverChildren

protected void copyOverChildren()

elementList

public java.util.List<java.lang.Object> elementList()
Returns a copy of the elements, in sequence.

Returns:

size

public int size()

addElement

protected void addElement(java.lang.Object element)

elements

public java.util.Enumeration<java.lang.Object> elements()

addAll

protected void addAll(java.util.SortedSet<DeweyOrderSet> sortedMembers)

compareTo

public int compareTo(java.lang.Object o)
Natural ordering is to compare by getGroupFullName().

Specified by:
compareTo in interface java.lang.Comparable

compareTo

public int compareTo(OrderSet o)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.