Package com.reportmill.base
Class RMGrouper
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.base.RMGrouper
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
This class simply manages a list of groupings and has some nice convenience methods.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddGrouping(RMGrouping aGrouping, int anIndex) Adds a given grouping to grouper's list of groupings.addGroupingForKey(String aKey) Adds a new grouping with the given key.addGroupingForKey(String aKey, int anIndex) Adds a new grouping with the given key at the given index.voidaddGroupings(List aList) Adds a given list of groupings to grouper's list of groupings.clone()Standard clone implementation.voidCopies attributes of given object.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.getGrouping(int anIndex) Returns the grouping at the given index.getGrouping(String aKey) Returns the grouping with the given key.intReturns the number of groupings in this grouper.getGroupingKey(int anIndex) Return the key for the grouping at the given index.Returns a list of keys for the current groupings.Returns the last grouping.groupObjects(List aList) Separates given objects into RMGroups defined by groupings.intReturns the index for the grouping with the given key.initWithArchiver(RMArchiver anArchiver) Legacy unarchival.voidmoveGrouping(int fromIndex, int toIndex) Moves a grouping from given fromIndex to given toIndex.voidremoveGrouping(int anIndex) Removes the grouping at the given index.voidremoveGrouping(RMGrouping aGrouping) Removes the given grouping.voidremoveGroupingForKey(String aKey) Removes the grouping with the given key.intsize()Returns the number of groupings in this grouper.toXML(RXArchiver anArchiver) XML archival.Methods inherited from class com.reportmill.base.RMObjectdidChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
- 
Constructor Details- 
RMGrouperpublic RMGrouper()Creates an empty grouper.
 
- 
- 
Method Details- 
getGroupingCountpublic int getGroupingCount()Returns the number of groupings in this grouper.
- 
sizepublic int size()Returns the number of groupings in this grouper.
- 
getGroupingReturns the grouping at the given index.
- 
getGroupingReturns the grouping with the given key.
- 
getGroupingLastReturns the last grouping.
- 
getGroupingKeyReturn the key for the grouping at the given index.
- 
indexOfReturns the index for the grouping with the given key.
- 
addGroupingAdds a given grouping to grouper's list of groupings.
- 
addGroupingsAdds a given list of groupings to grouper's list of groupings.
- 
addGroupingForKeyAdds a new grouping with the given key.
- 
addGroupingForKeyAdds a new grouping with the given key at the given index.
- 
removeGroupingpublic void removeGrouping(int anIndex) Removes the grouping at the given index.
- 
removeGroupingRemoves the given grouping.
- 
removeGroupingForKeyRemoves the grouping with the given key.
- 
moveGroupingpublic void moveGrouping(int fromIndex, int toIndex) Moves a grouping from given fromIndex to given toIndex.
- 
getGroupingKeysReturns a list of keys for the current groupings.
- 
groupObjectsSeparates given objects into RMGroups defined by groupings.
- 
cloneStandard clone implementation.
- 
copyCopies attributes of given object.
- 
equalsStandard equals implementation.
- 
toXMLXML archival.
- 
fromXMLXML unarchival.
- 
initWithArchiverLegacy unarchival.- Specified by:
- initWithArchiverin interface- RMArchiver.Archiving
- Overrides:
- initWithArchiverin class- RMObject
 
 
-