|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.util.DelegateMap orbital.logic.imp.InterpretationBase
public class InterpretationBase
A basic interpretation implementation.
Logic.satisfy(orbital.logic.imp.Interpretation, orbital.logic.imp.Formula)
,
Signature
,
Map
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry |
Constructor Summary | |
---|---|
protected |
InterpretationBase(Signature sigma)
Construct a problem specific interpretation source. |
|
InterpretationBase(Signature sigma,
java.util.Map associations)
Construct a new Interpretation with the given map of associations. |
|
InterpretationBase(Signature sigma,
java.util.SortedMap associations)
|
Method Summary | |
---|---|
boolean |
contains(java.lang.Object symbol)
|
boolean |
containsKey(java.lang.Object symbol)
Returns whether the specified symbol is contained in this interpretation assocation map. |
static Interpretation |
EMPTY(Signature sigma)
The empty interpretation ∅ for the given signature. |
boolean |
equals(java.lang.Object o)
Checks two interpretations for extensional equality. |
java.lang.Object |
get(java.lang.Object symbol)
Get the referent associated with the given symbol in this interpretation. |
Signature |
getSignature()
Get the signature interpreted. |
int |
hashCode()
Get a hash code fitting extensional equality. |
java.lang.Object |
put(java.lang.Object symbol,
java.lang.Object referent)
Set the referent associated with the given symbol in this interpretation. |
void |
putAll(java.util.Map associations)
Copies all of the associations from the specified map to this interpretation. |
java.lang.Object |
remove(java.lang.Object symbol)
|
void |
setSignature(Signature sigma)
Set the signature interpreted. |
java.lang.String |
toString()
|
Interpretation |
union(Interpretation i2)
Returns the union of two interpretations. |
static Interpretation |
unmodifiableInterpretation(Interpretation i)
Returns an unmodifiable view of the specified interpretation. |
Methods inherited from class orbital.util.DelegateMap |
---|
clear, containsValue, entrySet, getDelegatee, isEmpty, keySet, setDelegatee, size, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
clear, containsValue, entrySet, isEmpty, keySet, size, values |
Constructor Detail |
---|
protected InterpretationBase(Signature sigma)
Overwrite map operations like get(Object)
, contains(Object)
to implement a different source for symbol associations, than the map.
This is especially useful if a problem specific source for logical data values already
exists.
sigma
- the signature Σ whose symbols are interpreted by the custom interpretation source.
If sigma is null
, then it should be set later with setSignature(Signature)
.public InterpretationBase(Signature sigma, java.util.Map associations)
sigma
- the signature Σ whose symbols to interpret.associations
- the map that associates each symbol in sigma with a value object.public InterpretationBase(Signature sigma, java.util.SortedMap associations)
Method Detail |
---|
public static final Interpretation EMPTY(Signature sigma)
public boolean equals(java.lang.Object o)
Interpretation
equals
in interface java.util.Map
equals
in interface Interpretation
equals
in class DelegateMap
public int hashCode()
Interpretation
hashCode
in interface java.util.Map
hashCode
in interface Interpretation
hashCode
in class DelegateMap
public Signature getSignature()
getSignature
in interface Interpretation
public void setSignature(Signature sigma)
setSignature
in interface Interpretation
java.lang.IllegalArgumentException
- if sigma does not contain a symbol which is interpreted in the current assocation map.
This is not checked if sigma is null
.public java.lang.Object get(java.lang.Object symbol)
Interpretation
Overwrite along with other map operations like Set.contains(Object)
to implement
a different source for symbol associations.
get
in interface java.util.Map
get
in interface Interpretation
get
in class DelegateMap
public java.lang.Object remove(java.lang.Object symbol)
remove
in interface java.util.Map
remove
in class DelegateMap
public java.lang.Object put(java.lang.Object symbol, java.lang.Object referent)
Interpretation
put
in interface java.util.Map
put
in interface Interpretation
put
in class DelegateMap
public void putAll(java.util.Map associations)
Interpretation
putAll
in interface java.util.Map
putAll
in interface Interpretation
putAll
in class DelegateMap
public boolean containsKey(java.lang.Object symbol)
Interpretation
containsKey
in interface java.util.Map
containsKey
in interface Interpretation
containsKey
in class DelegateMap
public boolean contains(java.lang.Object symbol)
public Interpretation union(Interpretation i2)
Interpretation
union
in interface Interpretation
i2
- the interpretation to merge with this one, resulting in a new interpretation.
(If a symbol is contained in both interpretations, the value of i2 will precede over
the value of this.)
Setops.union(java.util.Collection,java.util.Collection)
public java.lang.String toString()
toString
in class java.lang.Object
public static final Interpretation unmodifiableInterpretation(Interpretation i)
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |