public class ComparableObjectSeries extends Series implements Cloneable, Serializable
Constructor and Description |
---|
ComparableObjectSeries(Comparable key)
Creates a new empty series.
|
ComparableObjectSeries(Comparable key,
boolean autoSort,
boolean allowDuplicateXValues)
Constructs a new series that contains no data.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all data items from the series and, unless the series is
already empty, sends a
SeriesChangeEvent to all registered
listeners. |
boolean |
equals(Object obj)
Tests this series for equality with an arbitrary object.
|
boolean |
getAllowDuplicateXValues()
Returns a flag that controls whether duplicate x-values are allowed.
|
boolean |
getAutoSort()
Returns the flag that controls whether the items in the series are
automatically sorted.
|
int |
getItemCount()
Returns the number of items in the series.
|
int |
getMaximumItemCount()
Returns the maximum number of items that will be retained in the series.
|
int |
hashCode()
Returns a hash code.
|
int |
indexOf(Comparable x)
Returns the index of the item with the specified x-value, or a negative
index if the series does not contain an item with that x-value.
|
ComparableObjectItem |
remove(Comparable x)
Removes the item with the specified x-value and sends a
SeriesChangeEvent to all registered listeners. |
void |
setMaximumItemCount(int maximum)
Sets the maximum number of items that will be retained in the series.
|
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, clone, fireSeriesChanged, getDescription, getKey, getNotify, isEmpty, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
public ComparableObjectSeries(Comparable key)
key
- the series key (null
not permitted).public ComparableObjectSeries(Comparable key, boolean autoSort, boolean allowDuplicateXValues)
key
- the series key (null
not permitted).autoSort
- a flag that controls whether or not the items in the
series are sorted.allowDuplicateXValues
- a flag that controls whether duplicate
x-values are allowed.public boolean getAutoSort()
public boolean getAllowDuplicateXValues()
public int getItemCount()
getItemCount
in class Series
public int getMaximumItemCount()
Integer.MAX_VALUE
.setMaximumItemCount(int)
public void setMaximumItemCount(int maximum)
Typically this value is set before the series is populated with data,
but if it is applied later, it may cause some items to be removed from
the series (in which case a SeriesChangeEvent
will be sent to
all registered listeners.
maximum
- the maximum number of items for the series.public int indexOf(Comparable x)
x
- the x-value (null
not permitted).public void clear()
SeriesChangeEvent
to all registered
listeners.public ComparableObjectItem remove(Comparable x)
SeriesChangeEvent
to all registered listeners.x
- the x-value.public boolean equals(Object obj)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics