public class RMGroup extends java.util.ArrayList implements RMKey.Get, RMKeyChain.Get
Modifier and Type | Class and Description |
---|---|
static class |
RMGroup.Running
This RMGroup subclass/inner-class represents a subset of a group up to the given endGroup.
|
Constructor and Description |
---|
RMGroup()
Creates an empty group.
|
RMGroup(java.util.List aList)
Creates a group with the (assumed) list of groups.
|
Modifier and Type | Method and Description |
---|---|
RMGroup |
clone()
Standard clone implementation.
|
RMGroup |
cloneDeep()
Clone deep implementation - clones this group and any child groups.
|
RMGroup |
cloneEmpty()
Clone deep implementation - clones this group and any child groups.
|
boolean |
equals(java.lang.Object anObj)
Standard equals.
|
java.util.List |
getAllValues(java.lang.String aKey)
Returns all values for a given grouping in this group hierarchy.
|
RMGroup |
getGroup(int anIndex)
Returns the sub-group at the given index.
|
RMGroup |
getGroupLast()
Returns the last sub-group.
|
java.lang.String |
getKey()
Returns the key associated with this group.
|
static java.lang.String |
getKey(java.util.List aList)
Returns the key for the given List if it is an RMGroup instance.
|
java.lang.Object |
getKeyChainValue(java.lang.Object aRoot,
RMKeyChain aKeyChain)
Custom implementation of valueForKeyChain to handle top N groups.
|
java.lang.Object |
getKeyValue(java.lang.String aKey)
Custom implementation of valueForKey to handle group heritage keys.
|
RMGroup |
getNextPeer()
Returns the next group which is a peer to this one.
|
RMGroup |
getPageEndGroup()
Returns the child group for the most recent page end.
|
RMGroup |
getPageStartGroup()
Returns the child group for the most recent page start.
|
RMGroup |
getParent()
Returns the parent for this group.
|
int |
getParentCount()
Returns the number of parents that this group has.
|
java.lang.Object |
getValue()
Returns the value associated with this group.
|
void |
groupBy(RMGrouper aGrouper,
int start)
Groups this group by the groupings in the given grouper.
|
void |
groupBy(RMGrouping aGrouping)
Groups this group by given grouping.
|
void |
groupBy(RMGrouping aGrouping,
java.util.List aValuesList)
Groups this group by given grouping.
|
void |
groupByKey(java.lang.String aKey,
java.util.List aValuesList)
Groups a new group by given keys list.
|
void |
groupByLeafKey(java.lang.String aKey)
Turns all list objects into leaf groups.
|
int |
index()
Returns the index of this group in its parent.
|
boolean |
isAncestor(RMGroup aGroup)
Returns whether given group is an ancestor group.
|
boolean |
isLeaf()
Returns whether this group is a leaf group.
|
static boolean |
isLeaf(java.util.List aList)
Returns whether the given List is an RMGroup instance that also isLeaf.
|
boolean |
isTopNOthers()
Returns whether this group is made up of the remainders from a TopN sort.
|
void |
setPageEndGroup(RMGroup aGroup)
Sets the child group for the most recent page end.
|
void |
setPageStartGroup(RMGroup aGroup)
Sets the child group for the most recent page start.
|
void |
setParent(RMGroup aGroup)
Sets the parent for this group.
|
void |
setTopNOthers(boolean aFlag)
Sets whether this group is made up of the remainders from a TopN sort.
|
void |
sortBy(java.util.List aSortList)
Sorts the group by the sorts in the given list.
|
void |
sortBy(RMGrouping aGrouping)
Sorts by sorts in given grouping.
|
RMGroup |
subgroup(int start,
int end)
Returns a subset of this group from start index, inclusive, to end index, exclusive.
|
RMGroup |
subgroup(RMGroup startGroup,
RMGroup endGroup)
Returns a subset of this group, running deep, which only includes the subset of the tree starting at startGroup
and ending at (but not including) endGroup.
|
void |
topNSortBy(RMTopNSort aSort)
Performs top N sort on group for an individual sort.
|
java.lang.String |
toString()
Returns a string representation of this group.
|
add, add, addAll, addAll, clear, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public RMGroup()
public RMGroup(java.util.List aList)
public java.lang.String getKey()
public java.lang.Object getValue()
public RMGroup getParent()
public void setParent(RMGroup aGroup)
public int getParentCount()
public boolean isAncestor(RMGroup aGroup)
public boolean isLeaf()
public boolean isTopNOthers()
public void setTopNOthers(boolean aFlag)
public RMGroup getPageStartGroup()
public void setPageStartGroup(RMGroup aGroup)
public RMGroup getPageEndGroup()
public void setPageEndGroup(RMGroup aGroup)
public int index()
public RMGroup getGroup(int anIndex)
public RMGroup getGroupLast()
public void groupBy(RMGrouper aGrouper, int start)
public void groupBy(RMGrouping aGrouping)
public void groupBy(RMGrouping aGrouping, java.util.List aValuesList)
public void groupByKey(java.lang.String aKey, java.util.List aValuesList)
public void groupByLeafKey(java.lang.String aKey)
public void topNSortBy(RMTopNSort aSort)
public void sortBy(RMGrouping aGrouping)
public void sortBy(java.util.List aSortList)
public java.util.List getAllValues(java.lang.String aKey)
public RMGroup subgroup(int start, int end)
public RMGroup subgroup(RMGroup startGroup, RMGroup endGroup)
public static java.lang.String getKey(java.util.List aList)
public static boolean isLeaf(java.util.List aList)
public java.lang.Object getKeyValue(java.lang.String aKey)
getKeyValue
in interface RMKey.Get
public java.lang.Object getKeyChainValue(java.lang.Object aRoot, RMKeyChain aKeyChain)
getKeyChainValue
in interface RMKeyChain.Get
public RMGroup getNextPeer()
public boolean equals(java.lang.Object anObj)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.util.AbstractList
public RMGroup clone()
clone
in class java.util.ArrayList
public RMGroup cloneDeep()
public RMGroup cloneEmpty()
public java.lang.String toString()
toString
in class java.util.AbstractCollection