|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iu.cnets.klatsch.lang.Value
edu.iu.cnets.klatsch.lang.VDictionary
public class VDictionary
This value represents a dictionary (i.e., associative array).
Field Summary | |
---|---|
(package private) java.util.Map<VString,Value> |
map
our actual storage mechanism |
Constructor Summary | |
---|---|
VDictionary()
Constructs a new, empty dictionary. |
Method Summary | |
---|---|
Value |
method_delete(Value... args)
delete(s) : Removes any association for s. |
Value |
method_get(Value... args)
get(s) : Returns the value associated with s. |
Value |
method_has(Value... args)
has(s) : Returns true if the dictionary has an association for s. |
Value |
method_keys(Value... args)
keys() : Returns a stream of keys for the dictionary. |
Value |
method_set(Value... args)
set(s, v) : Associates s with the value v, replacing any existing association. |
Value |
method_values(Value... args)
values() : Returns a stream of values for the dictionary. |
void |
set(VString key,
Value val)
Updates the given association. |
java.lang.String |
toJson()
Creates a JSON representation of the dictionary. |
java.lang.String |
toString()
Creates a (largely opaque) printed representation of the dictionary. |
Methods inherited from class edu.iu.cnets.klatsch.lang.Value |
---|
require, requireCount, requireType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.util.Map<VString,Value> map
Constructor Detail |
---|
public VDictionary()
Method Detail |
---|
public void set(VString key, Value val)
key
- the key to updateval
- the new value for that keypublic java.lang.String toString()
toString
in class Value
public java.lang.String toJson()
toJson
in class Value
public Value method_delete(Value... args) throws EvaluationException
EvaluationException
public Value method_has(Value... args) throws EvaluationException
EvaluationException
public Value method_get(Value... args) throws EvaluationException
EvaluationException
public Value method_keys(Value... args) throws EvaluationException
EvaluationException
public Value method_set(Value... args) throws EvaluationException
EvaluationException
public Value method_values(Value... args) throws EvaluationException
EvaluationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |