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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGrouping
(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.void
addGroupings
(List aList) Adds a given list of groupings to grouper's list of groupings.clone()
Standard clone implementation.void
Copies attributes of given object.boolean
Standard 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.int
Returns 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.int
Returns the index for the grouping with the given key.initWithArchiver
(RMArchiver anArchiver) Legacy unarchival.void
moveGrouping
(int fromIndex, int toIndex) Moves a grouping from given fromIndex to given toIndex.void
removeGrouping
(int anIndex) Removes the grouping at the given index.void
removeGrouping
(RMGrouping aGrouping) Removes the given grouping.void
removeGroupingForKey
(String aKey) Removes the grouping with the given key.int
size()
Returns the number of groupings in this grouper.toXML
(RXArchiver anArchiver) XML archival.Methods inherited from class com.reportmill.base.RMObject
didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
-
Constructor Details
-
RMGrouper
public RMGrouper()Creates an empty grouper.
-
-
Method Details
-
getGroupingCount
public int getGroupingCount()Returns the number of groupings in this grouper. -
size
public int size()Returns the number of groupings in this grouper. -
getGrouping
Returns the grouping at the given index. -
getGrouping
Returns the grouping with the given key. -
getGroupingLast
Returns the last grouping. -
getGroupingKey
Return the key for the grouping at the given index. -
indexOf
Returns the index for the grouping with the given key. -
addGrouping
Adds a given grouping to grouper's list of groupings. -
addGroupings
Adds a given list of groupings to grouper's list of groupings. -
addGroupingForKey
Adds a new grouping with the given key. -
addGroupingForKey
Adds a new grouping with the given key at the given index. -
removeGrouping
public void removeGrouping(int anIndex) Removes the grouping at the given index. -
removeGrouping
Removes the given grouping. -
removeGroupingForKey
Removes the grouping with the given key. -
moveGrouping
public void moveGrouping(int fromIndex, int toIndex) Moves a grouping from given fromIndex to given toIndex. -
getGroupingKeys
Returns a list of keys for the current groupings. -
groupObjects
Separates given objects into RMGroups defined by groupings. -
clone
Standard clone implementation. -
copy
Copies attributes of given object. -
equals
Standard equals implementation. -
toXML
XML archival. -
fromXML
XML unarchival. -
initWithArchiver
Legacy unarchival.- Specified by:
initWithArchiver
in interfaceRMArchiver.Archiving
- Overrides:
initWithArchiver
in classRMObject
-