Package com.inductiveautomation.rm.base
Class RMGroup
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
com.inductiveautomation.rm.base.RMGroup
- All Implemented Interfaces:
- RMKey.Get,- RMKeyChain.Get,- Serializable,- Cloneable,- Iterable,- Collection,- List,- RandomAccess
- Direct Known Subclasses:
- RMGroup.Running
This class is a smart List subclass used to hold objects from an original list broken down by grouping keys.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classThis RMGroup subclass/inner-class represents a subset of a group up to the given endGroup.
- 
Field SummaryFields inherited from class java.util.AbstractListmodCount
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()Standard clone implementation.Clone deep implementation - clones this group and any child groups.Clone deep implementation - clones this group and any child groups.booleanStandard equals.getAllValues(String aKey) Returns all values for a given grouping in this group hierarchy.getGroup(int anIndex) Returns the sub-group at the given index.Returns the last sub-group.getKey()Returns the key associated with this group.static StringReturns the key for the given List if it is an RMGroup instance.getKeyChainValue(Object aRoot, RMKeyChain aKeyChain) Custom implementation of valueForKeyChain to handle top N groups.getKeyValue(String aKey) Custom implementation of valueForKey to handle group heritage keys.Returns the next group which is a peer to this one.Returns the child group for the most recent page end.Returns the child group for the most recent page start.Returns the parent for this group.intReturns the number of parents that this group has.getValue()Returns the value associated with this group.voidGroups this group by the groupings in the given grouper.voidgroupBy(RMGrouping aGrouping) Groups this group by given grouping.voidgroupBy(RMGrouping aGrouping, List aValuesList) Groups this group by given grouping.voidgroupByKey(String aKey, List aValuesList) Groups a new group by given keys list.voidgroupByLeafKey(String aKey) Turns all list objects into leaf groups.intindex()Returns the index of this group in its parent.booleanisAncestor(RMGroup aGroup) Returns whether given group is an ancestor group.booleanisLeaf()Returns whether this group is a leaf group.static booleanReturns whether the given List is an RMGroup instance that also isLeaf.booleanReturns whether this group is made up of the remainders from a TopN sort.voidsetPageEndGroup(RMGroup aGroup) Sets the child group for the most recent page end.voidsetPageStartGroup(RMGroup aGroup) Sets the child group for the most recent page start.voidSets the parent for this group.voidsetTopNOthers(boolean aFlag) Sets whether this group is made up of the remainders from a TopN sort.voidsortBy(RMGrouping aGrouping) Sorts by sorts in given grouping.voidSorts the group by the sorts in the given list.subgroup(int start, int end) Returns a subset of this group from start index, inclusive, to end index, exclusive.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.voidtopNSortBy(RMTopNSort aSort) Performs top N sort on group for an individual sort.toString()Returns a string representation of this group.Methods inherited from class java.util.ArrayListadd, add, addAll, addAll, clear, contains, ensureCapacity, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollectioncontainsAllMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, stream, toArrayMethods inherited from interface java.util.ListcontainsAll
- 
Constructor Details- 
RMGrouppublic RMGroup()Creates an empty group.
- 
RMGroupCreates a group with the (assumed) list of groups.
 
- 
- 
Method Details- 
getKeyReturns the key associated with this group.
- 
getValueReturns the value associated with this group.
- 
getParentReturns the parent for this group.
- 
setParentSets the parent for this group.
- 
getParentCountpublic int getParentCount()Returns the number of parents that this group has.
- 
isAncestorReturns whether given group is an ancestor group.
- 
isLeafpublic boolean isLeaf()Returns whether this group is a leaf group.
- 
isTopNOtherspublic boolean isTopNOthers()Returns whether this group is made up of the remainders from a TopN sort.
- 
setTopNOtherspublic void setTopNOthers(boolean aFlag) Sets whether this group is made up of the remainders from a TopN sort.
- 
getPageStartGroupReturns the child group for the most recent page start.
- 
setPageStartGroupSets the child group for the most recent page start.
- 
getPageEndGroupReturns the child group for the most recent page end.
- 
setPageEndGroupSets the child group for the most recent page end.
- 
indexpublic int index()Returns the index of this group in its parent.
- 
getGroupReturns the sub-group at the given index.
- 
getGroupLastReturns the last sub-group.
- 
groupByGroups this group by the groupings in the given grouper.
- 
groupByGroups this group by given grouping.
- 
groupByGroups this group by given grouping.
- 
groupByKeyGroups a new group by given keys list.
- 
groupByLeafKeyTurns all list objects into leaf groups.
- 
topNSortByPerforms top N sort on group for an individual sort.
- 
sortBySorts by sorts in given grouping.
- 
sortBySorts the group by the sorts in the given list.
- 
getAllValuesReturns all values for a given grouping in this group hierarchy.
- 
subgroupReturns a subset of this group from start index, inclusive, to end index, exclusive.
- 
subgroupReturns 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.
- 
getKeyReturns the key for the given List if it is an RMGroup instance.
- 
isLeafReturns whether the given List is an RMGroup instance that also isLeaf.
- 
getKeyValueCustom implementation of valueForKey to handle group heritage keys.- Specified by:
- getKeyValuein interface- RMKey.Get
 
- 
getKeyChainValueCustom implementation of valueForKeyChain to handle top N groups.- Specified by:
- getKeyChainValuein interface- RMKeyChain.Get
 
- 
getNextPeerReturns the next group which is a peer to this one.
- 
equalsStandard equals. Just check identity because leaf objects might be interconnected (and can stack overflow).
- 
cloneStandard clone implementation.
- 
cloneDeepClone deep implementation - clones this group and any child groups.
- 
cloneEmptyClone deep implementation - clones this group and any child groups.
- 
toStringReturns a string representation of this group.- Overrides:
- toStringin class- AbstractCollection
 
 
-