public class DeweyOrderSet extends Object implements Comparable<DeweyOrderSet>, Iterable<Object>
At each level the elements are either FacetedMethods or they are
instances of OrderSet represent a group of FacetedMethods
that have a MemberOrderFacet of the same name.
With no name, (ie name="" is the default), at the top level
MemberOrder(sequence="1") MemberOrder(sequence="1.1") MemberOrder(sequence="1.2") MemberOrder(sequence="1.2.1") MemberOrder(sequence="1.3")
With names, creates a hierarchy.
MemberOrder(sequence="1.1") // no parent MemberOrder(sequence="1.2.1") MemberOrder(sequence="1.3") MemberOrder(name="abc", sequence="1") // group is abc, parent is "" MemberOrder(name="abc", sequence="1.2") MemberOrder(name="abc,def", sequence="1") // group is def, parent is abc MemberOrder(name="abc,def", sequence="1.2")
| Modifier and Type | Field and Description |
|---|---|
protected SortedSet<DeweyOrderSet> |
childOrderSets
A staging area until we are ready to add the child sets to the collection
of elements owned by the superclass.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAll(SortedSet<?> sortedMembers) |
protected void |
addChild(DeweyOrderSet childOrderSet) |
protected void |
addElement(Object element) |
List<DeweyOrderSet> |
children() |
int |
compareTo(DeweyOrderSet o)
Natural ordering is to compare by
getGroupFullName(). |
protected void |
copyOverChildren() |
static DeweyOrderSet |
createOrderSet(List<? extends IdentifiedHolder> identifiedHolders) |
List<Object> |
elementList()
Returns a copy of the elements, in sequence.
|
boolean |
equals(Object obj) |
String |
getGroupFullName()
The group name exactly as it was supplied in the constructor (analogous
to a fully qualified file name).
|
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).
|
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).
|
DeweyOrderSet |
getParent() |
int |
hashCode() |
Iterator<Object> |
iterator() |
void |
reorderChildren(List<String> requiredOrder) |
protected void |
setParent(DeweyOrderSet parent) |
int |
size() |
String |
toString()
Format is: abc,def:XXel/YYm/ZZch
|
protected SortedSet<DeweyOrderSet> childOrderSets
public static DeweyOrderSet createOrderSet(List<? extends IdentifiedHolder> identifiedHolders)
public String getGroupName()
For example, if supplied abc,def,ghi in the constructor, then this will return ghi.
public String getGroupFullName()
For example, if supplied abc,def,ghi in the constructor, then this will return the same string abc,def,ghi.
public String getGroupPath()
For example, if supplied abc,def,ghi in the constructor, then this will return abc,def.
protected void setParent(DeweyOrderSet parent)
public DeweyOrderSet getParent()
protected void addChild(DeweyOrderSet childOrderSet)
public List<DeweyOrderSet> children()
protected void copyOverChildren()
public List<Object> elementList()
public int size()
protected void addElement(Object element)
public void reorderChildren(List<String> requiredOrder)
public int compareTo(DeweyOrderSet o)
getGroupFullName().compareTo in interface Comparable<DeweyOrderSet>Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.