public class LegendItemCollection extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable
Constructor and Description |
---|
LegendItemCollection()
Constructs a new legend item collection, initially empty.
|
Modifier and Type | Method and Description |
---|---|
void |
add(LegendItem item)
Adds a legend item to the collection.
|
void |
addAll(LegendItemCollection collection)
Adds the legend items from another collection to this collection.
|
java.lang.Object |
clone()
Returns a clone of the collection.
|
boolean |
equals(java.lang.Object obj)
Tests this collection for equality with an arbitrary object.
|
LegendItem |
get(int index)
Returns a legend item from the collection.
|
int |
getItemCount()
Returns the number of legend items in the collection.
|
java.util.Iterator |
iterator()
Returns an iterator that provides access to all the legend items.
|
public LegendItemCollection()
public void add(LegendItem item)
item
- the item to add.public void addAll(LegendItemCollection collection)
collection
- the other collection (null
not
permitted).public LegendItem get(int index)
index
- the legend item index (zero-based).public int getItemCount()
public java.util.Iterator iterator()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object (null
permitted).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if an item in the collection is not
cloneable.