public class KeyToGroupMap extends Object implements Cloneable, org.jfree.util.PublicCloneable, Serializable
Comparable) to groups.| Constructor and Description |
|---|
KeyToGroupMap()
Creates a new map with a default group named 'Default Group'.
|
KeyToGroupMap(Comparable defaultGroup)
Creates a new map with the specified default group.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a clone of the map.
|
boolean |
equals(Object obj)
Tests the map for equality against an arbitrary object.
|
Comparable |
getGroup(Comparable key)
Returns the group that a key is mapped to.
|
int |
getGroupCount()
Returns the number of groups in the map.
|
int |
getGroupIndex(Comparable group)
Returns the index for the group.
|
List |
getGroups()
Returns a list of the groups (always including the default group) in the
map.
|
int |
getKeyCount(Comparable group)
Returns the number of keys mapped to the specified group.
|
void |
mapKeyToGroup(Comparable key,
Comparable group)
Maps a key to a group.
|
public KeyToGroupMap()
public KeyToGroupMap(Comparable defaultGroup)
defaultGroup - the default group (null not permitted).public int getGroupCount()
public List getGroups()
null).public int getGroupIndex(Comparable group)
group - the group.public Comparable getGroup(Comparable key)
key - the key (null not permitted).null, returns the default group if
there is no mapping for the specified key).public void mapKeyToGroup(Comparable key, Comparable group)
key - the key (null not permitted).group - the group (null permitted, clears any
existing mapping).public int getKeyCount(Comparable group)
group - the group (null not permitted).public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class ObjectCloneNotSupportedException - if there is a problem cloning the
map.Copyright © 2001-2014 JFree.org. All Rights Reserved.