se.chalmers.cs.gf.linearize.gfvalue
Class Record

java.lang.Object
  extended by se.chalmers.cs.gf.linearize.gfvalue.Value
      extended by se.chalmers.cs.gf.linearize.gfvalue.Record
All Implemented Interfaces:
java.lang.Comparable<Value>

public class Record
extends Value

Record value.


Constructor Summary
Record()
           
Record(java.util.Map<java.lang.String,Value> fields)
           
 
Method Summary
<R,A> R
accept(ValueVisitor<R,A> v, A arg)
           
 boolean equals(java.lang.Object o)
           
 boolean equals(Record r)
           
 Value get(java.lang.String name)
           
 java.util.Map<java.lang.String,Value> getFields()
          Do not modify the returned map.
 boolean hasField(java.lang.String name)
           
 int hashCode()
           
 boolean match(Value p)
          Check if this value matches the given pattern.
 void set(java.lang.String name, Value value)
           
static Record ss(java.lang.String s)
           
 java.lang.String toString()
           
 
Methods inherited from class se.chalmers.cs.gf.linearize.gfvalue.Value
compareTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Record

public Record()

Record

public Record(java.util.Map<java.lang.String,Value> fields)
Method Detail

getFields

public java.util.Map<java.lang.String,Value> getFields()
Do not modify the returned map.


hasField

public boolean hasField(java.lang.String name)

get

public Value get(java.lang.String name)

set

public void set(java.lang.String name,
                Value value)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(Record r)

match

public boolean match(Value p)
Description copied from class: Value
Check if this value matches the given pattern. The default implementation compares the toString() value.

Overrides:
match in class Value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

ss

public static Record ss(java.lang.String s)

accept

public <R,A> R accept(ValueVisitor<R,A> v,
                      A arg)
Specified by:
accept in class Value