|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.ui.graphicGraph.stylesheet.Values
public class Values
Several values and the units of these values.
As a style sheet may express values in several different units. This class purpose is to pack the value and the units it is expressed in into a single object.
Field Summary | |
---|---|
StyleConstants.Units |
units
The values units. |
ArrayList<Double> |
values
The value. |
Constructor Summary | |
---|---|
Values(StyleConstants.Units units,
double... values)
New value set with one initial value. |
|
Values(Value value)
New set of one value. |
|
Values(Values other)
New copy of another value set. |
Method Summary | |
---|---|
void |
addValues(double... values)
Append the given set of values at the end of this set. |
void |
copy(Values values)
Copy the given values to this set. |
boolean |
equals(Object o)
|
double |
get(int i)
The i-th value of this set. |
StyleConstants.Units |
getUnits()
Values units. |
int |
getValueCount()
Number of values in this set. |
void |
insertValue(int i,
double value)
Insert the given value at the given index. |
Iterator<Double> |
iterator()
|
void |
removeValue(int i)
Remove the i-th value. |
void |
setUnits(StyleConstants.Units units)
Change the values units. |
void |
setValue(int i,
double value)
Change the i-th value. |
int |
size()
Number of values in this set. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public ArrayList<Double> values
public StyleConstants.Units units
Constructor Detail |
---|
public Values(StyleConstants.Units units, double... values)
units
- The values units.values
- A variable count of values.public Values(Values other)
other
- The other values to copy.public Values(Value value)
value
- The value to copy with its units.Method Detail |
---|
public int size()
public int getValueCount()
public double get(int i)
i
- The value index.
public StyleConstants.Units getUnits()
public boolean equals(Object o)
equals
in class Object
public Iterator<Double> iterator()
iterator
in interface Iterable<Double>
public String toString()
toString
in class Object
public void copy(Values values)
values
- The values to copy.public void addValues(double... values)
values
- The value set to append.public void insertValue(int i, double value)
i
- Where to insert the value.value
- The value to insert.public void setValue(int i, double value)
i
- The value index.value
- The value to put.public void removeValue(int i)
i
- The index at which the value is to be removed.public void setUnits(StyleConstants.Units units)
units
- The units.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |