Package com.reportmill.base
Class RMGrouper
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.base.RMGrouper
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class RMGrouper extends RMObject This class simply manages a list of groupings and has some nice convenience methods.
- 
- 
Constructor SummaryConstructors Constructor Description RMGrouper()Creates an empty grouper.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGrouping(RMGrouping aGrouping, int anIndex)Adds a given grouping to grouper's list of groupings.RMGroupingaddGroupingForKey(java.lang.String aKey)Adds a new grouping with the given key.RMGroupingaddGroupingForKey(java.lang.String aKey, int anIndex)Adds a new grouping with the given key at the given index.voidaddGroupings(java.util.List aList)Adds a given list of groupings to grouper's list of groupings.java.lang.Objectclone()Standard clone implementation.voidcopy(java.lang.Object anObj)Copies attributes of given object.booleanequals(java.lang.Object anObj)Standard equals implementation.java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.RMGroupinggetGrouping(int anIndex)Returns the grouping at the given index.RMGroupinggetGrouping(java.lang.String aKey)Returns the grouping with the given key.intgetGroupingCount()Returns the number of groupings in this grouper.java.lang.StringgetGroupingKey(int anIndex)Return the key for the grouping at the given index.java.util.ListgetGroupingKeys()Returns a list of keys for the current groupings.RMGroupinggetGroupingLast()Returns the last grouping.RMGroupgroupObjects(java.util.List aList)Separates given objects into RMGroups defined by groupings.intindexOf(java.lang.String aKey)Returns the index for the grouping with the given key.java.lang.ObjectinitWithArchiver(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(java.lang.String aKey)Removes the grouping with the given key.intsize()Returns the number of groupings in this grouper.RXElementtoXML(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.reportmill.base.RMObjectdidChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
getGroupingCountpublic int getGroupingCount() Returns the number of groupings in this grouper.
 - 
sizepublic int size() Returns the number of groupings in this grouper.
 - 
getGroupingpublic RMGrouping getGrouping(int anIndex) Returns the grouping at the given index.
 - 
getGroupingpublic RMGrouping getGrouping(java.lang.String aKey) Returns the grouping with the given key.
 - 
getGroupingLastpublic RMGrouping getGroupingLast() Returns the last grouping.
 - 
getGroupingKeypublic java.lang.String getGroupingKey(int anIndex) Return the key for the grouping at the given index.
 - 
indexOfpublic int indexOf(java.lang.String aKey) Returns the index for the grouping with the given key.
 - 
addGroupingpublic void addGrouping(RMGrouping aGrouping, int anIndex) Adds a given grouping to grouper's list of groupings.
 - 
addGroupingspublic void addGroupings(java.util.List aList) Adds a given list of groupings to grouper's list of groupings.
 - 
addGroupingForKeypublic RMGrouping addGroupingForKey(java.lang.String aKey) Adds a new grouping with the given key.
 - 
addGroupingForKeypublic RMGrouping addGroupingForKey(java.lang.String aKey, int anIndex) Adds a new grouping with the given key at the given index.
 - 
removeGroupingpublic void removeGrouping(int anIndex) Removes the grouping at the given index.
 - 
removeGroupingpublic void removeGrouping(RMGrouping aGrouping) Removes the given grouping.
 - 
removeGroupingForKeypublic void removeGroupingForKey(java.lang.String aKey) Removes the grouping with the given key.
 - 
moveGroupingpublic void moveGrouping(int fromIndex, int toIndex)Moves a grouping from given fromIndex to given toIndex.
 - 
getGroupingKeyspublic java.util.List getGroupingKeys() Returns a list of keys for the current groupings.
 - 
groupObjectspublic RMGroup groupObjects(java.util.List aList) Separates given objects into RMGroups defined by groupings.
 - 
clonepublic java.lang.Object clone() Standard clone implementation.
 - 
copypublic void copy(java.lang.Object anObj) Copies attributes of given object.
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.- Overrides:
- equalsin class- java.lang.Object
 
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.
 - 
fromXMLpublic java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.
 - 
initWithArchiverpublic java.lang.Object initWithArchiver(RMArchiver anArchiver) Legacy unarchival.- Specified by:
- initWithArchiverin interface- RMArchiver.Archiving
- Overrides:
- initWithArchiverin class- RMObject
 
 
- 
 
-