public class Ensemble
extends java.lang.Object
implements java.io.Serializable
Quantity
s and
Value
s. Each Quantity can have only one associated
Value.Constructor and Description |
---|
Ensemble()
Create a new Ensemble
|
Modifier and Type | Method and Description |
---|---|
java.util.Set |
entrySet()
Get the set of
Value s in the Ensemble. |
boolean |
equals(java.lang.Object oo)
See if the Object in question is equal to this Ensemble.
|
java.lang.StringBuffer |
format(java.lang.StringBuffer buf)
Format the entire Ensemble.
|
protected java.lang.StringBuffer |
formatEntry(java.lang.StringBuffer buf,
java.util.Map.Entry entry)
Format the Entry.
|
Value |
get(Quantity qq)
Get the Value of a
Quantity from the Ensemble |
Value |
get(java.lang.String qstr)
|
int |
hashCode()
Return the hash code for this object.
|
boolean |
isEmpty()
See if this ensemble is empty
|
java.util.Set |
keySet()
Get the set of
Quantity s in the Ensemble. |
Value |
put(Quantity qq,
Value vv)
Put a
Quantity in the Ensemble |
Value |
put(java.lang.String qstr,
int vv,
java.lang.String uStr)
Pust a
Quantity into the Ensemble. |
int |
size()
Get the size of the ensemble.
|
java.lang.String |
toString()
Return a String representation of this Ensemble
|
public Value put(java.lang.String qstr, int vv, java.lang.String uStr)
Quantity
into the Ensemble.qstr
- quantity namevv
- quantity valueuStr
- unit namepublic Value put(Quantity qq, Value vv)
Quantity
in the Ensembleqq
- Quantityvv
- Valuepublic Value get(Quantity qq)
Quantity
from the Ensembleqq
- Quantity to look uppublic Value get(java.lang.String qstr)
qstr
- quantity namepublic boolean isEmpty()
public int size()
public java.util.Set keySet()
Quantity
s in the Ensemble.public java.util.Set entrySet()
Value
s in the Ensemble.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object oo)
equals
in class java.lang.Object
oo
- Object in questionprotected java.lang.StringBuffer formatEntry(java.lang.StringBuffer buf, java.util.Map.Entry entry)
buf
- StringBuffer for formattingentry
- Entry to formatpublic java.lang.StringBuffer format(java.lang.StringBuffer buf)
buf
- StringBuffer to put formatted entries intopublic java.lang.String toString()
toString
in class java.lang.Object