|
Orbital library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorbital.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 Form| Nested 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.Mapequals in interface Interpretationequals in class DelegateMappublic int hashCode()
Interpretation
hashCode in interface java.util.MaphashCode in interface InterpretationhashCode in class DelegateMappublic Signature getSignature()
getSignature in interface Interpretationpublic void setSignature(Signature sigma)
setSignature in interface Interpretationjava.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.Mapget in interface Interpretationget in class DelegateMappublic java.lang.Object remove(java.lang.Object symbol)
remove in interface java.util.Mapremove in class DelegateMap
public java.lang.Object put(java.lang.Object symbol,
java.lang.Object referent)
Interpretation
put in interface java.util.Mapput in interface Interpretationput in class DelegateMappublic void putAll(java.util.Map associations)
Interpretation
putAll in interface java.util.MapputAll in interface InterpretationputAll in class DelegateMappublic boolean containsKey(java.lang.Object symbol)
Interpretation
containsKey in interface java.util.MapcontainsKey in interface InterpretationcontainsKey in class DelegateMappublic boolean contains(java.lang.Object symbol)
public Interpretation union(Interpretation i2)
Interpretation
union in interface Interpretationi2 - 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.Objectpublic static final Interpretation unmodifiableInterpretation(Interpretation i)
|
Orbital library 1.2.0: 23 Apr 2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||