|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ai.planning.strips.Domain
public class Domain
Nested Class Summary | |
---|---|
static class |
Domain.DomainType
|
protected static class |
Domain.DomainTypeSystem
|
protected static class |
Domain.PredicateArgNrPair
|
Field Summary | |
---|---|
protected java.util.Map<java.lang.Class<? extends ai.planning.strips.extensible.Extension>,ai.planning.strips.extensible.Extension> |
extensions
the Extensions used by this Domain |
protected java.util.Set<ai.krr.NamedSymbol> |
fluentRelations
the set of relations that represent fluents in this domain |
protected ai.krr.NamedSymbol |
name
the name given to this Domain |
protected java.util.List<ActionType> |
operators
the List of ActionTypes that define this Domain |
protected java.util.Set<ai.krr.NamedSymbol> |
staticRelations
the set of relations that represent fluents in this domain |
protected Domain.DomainTypeSystem |
types
the inferred DomainTypes for this Domain (computed on demand) |
Constructor Summary | |
---|---|
Domain(ai.krr.NamedSymbol name,
ActionType... ops)
This constructor creates a new Domain that has the given name and is defined by the given ActionTypes. |
|
Domain(ai.krr.NamedSymbol name,
java.util.List<ActionType> ops)
This constructor creates a new Domain that has the given name and is defined by the given ActionTypes. |
Method Summary | |
---|---|
protected ActionType |
clone()
This class does not support cloning and an Exception will be thrown if this method is called. |
boolean |
equals(java.lang.Object obj)
This function tests whether this and the given domain are the same Object. |
static Domain |
forName(ai.krr.NamedSymbol name)
This function returns the Domain that has been associated with the given name. |
java.util.Set<Domain.DomainType> |
getDomainTypes()
This function returns the derived set of domain types that have been defined for this Domain. |
protected Domain.DomainTypeSystem |
getDomainTypeSystem()
This function returns the inferred types for this Domain. |
ai.planning.strips.extensible.Extension |
getExtension(java.lang.Class<? extends ai.planning.strips.extensible.Extension> type)
This function retrieves the extension of the given type that may be used by this Domain. |
java.util.Set<ai.krr.NamedSymbol> |
getFluentRelations()
This function returns the Set of all the NamedSymbols that appear as relations in effects of the operators. |
ai.krr.NamedSymbol |
getName()
This function returns the name of this Domain. |
ActionType<ai.krr.fol.Atom> |
getOperator(ai.krr.NamedSymbol name)
This function can be used to retrieve a specific ActionType defined in this Domain. |
java.util.List<ActionType> |
getOperators()
This function returns the List of ActionTypes that define this Domain. |
Domain.DomainType[] |
getSignature(ai.krr.NamedSymbol relation)
This function returns the signature for the given relation in this Domain. |
java.util.Set<ai.krr.NamedSymbol> |
getStaticRelations()
This function returns the Set of all the NamedSymbols that appear as relations in preconditions of the operators, but do not appear in any of the effects. |
int |
hashCode()
This function returns a hash value for this domain. |
void |
prettyPrint(int indent,
java.io.Writer w,
inf.compilers.SyntaxAdaptor sa)
This function can be used write this SyntaxAdaptable object to the given Writer. |
static Domain |
read(java.io.Reader r,
inf.compilers.SyntaxAdaptor<Domain> sa)
This function attempts to read and parse a Domain from the given Reader. |
java.lang.String |
toString()
This function creates a String representation for this Domain. |
void |
useExtension(ai.planning.strips.extensible.Extension extension)
This function add the given extension to this Domain. |
void |
write(java.io.Writer w,
inf.compilers.SyntaxAdaptor sa)
This function can be used write this logical Sentence to the given Writer. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ai.krr.NamedSymbol name
protected java.util.List<ActionType> operators
protected java.util.Set<ai.krr.NamedSymbol> fluentRelations
protected java.util.Set<ai.krr.NamedSymbol> staticRelations
protected java.util.Map<java.lang.Class<? extends ai.planning.strips.extensible.Extension>,ai.planning.strips.extensible.Extension> extensions
protected Domain.DomainTypeSystem types
Constructor Detail |
---|
public Domain(ai.krr.NamedSymbol name, java.util.List<ActionType> ops)
This constructor creates a new Domain that has the given name and is defined by the given ActionTypes.
name
- the Symbol representing the name of this Domainops
- the ActionTypes in this Domainpublic Domain(ai.krr.NamedSymbol name, ActionType... ops)
This constructor creates a new Domain that has the given name and is defined by the given ActionTypes.
name
- the Symbol representing the name of this Domainops
- the ActionTypes in this DomainMethod Detail |
---|
protected ActionType clone() throws java.lang.CloneNotSupportedException
This class does not support cloning and an Exception will be thrown if this method is called.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- will be thrownpublic void write(java.io.Writer w, inf.compilers.SyntaxAdaptor sa) throws inf.compilers.ExpressivenessException, java.io.IOException
This function can be used write this logical Sentence to the given Writer. The syntax in which it is written is defined by the SyntaxAdaptor that is also given to this function.
write
in interface inf.compilers.SyntaxAdaptable
w
- the Writer to which this Sentence is writtensa
- the SyntaxAdaptor that determines the syntax
inf.compilers.ExpressivenessException
- if the syntax does not support every
construct occurring in this Sentence
java.io.IOException
- if writing to the Writer failspublic void prettyPrint(int indent, java.io.Writer w, inf.compilers.SyntaxAdaptor sa) throws inf.compilers.ExpressivenessException, java.io.IOException
This function can be used write this SyntaxAdaptable object to the given Writer. The syntax is the same as for normal writing. The only difference is the inclusion of extra space and newlines for better readability.
prettyPrint
in interface inf.compilers.SyntaxAdaptable
indent
- the amount of indentation for the first linew
- the Writer to which this Sentence is writtensa
- the SyntaxAdaptor that determines the syntax
inf.compilers.ExpressivenessException
- if the syntax does not support every
construct occurring in this Sentence
java.io.IOException
- if writing to the Writer failspublic ai.krr.NamedSymbol getName()
This function returns the name of this Domain.
getName
in interface Domain<ai.krr.fol.Atom>
public java.util.List<ActionType> getOperators()
This function returns the List of ActionTypes that define this Domain.
getOperators
in interface Domain<ai.krr.fol.Atom>
public ActionType<ai.krr.fol.Atom> getOperator(ai.krr.NamedSymbol name)
This function can be used to retrieve a specific ActionType defined in this Domain. If there is no ActionTpye with the given name, this function returns null.
getOperator
in interface Domain<ai.krr.fol.Atom>
name
- the name identifying the ActionType
public java.util.Set<ai.krr.NamedSymbol> getStaticRelations()
This function returns the Set of all the NamedSymbols that appear as relations in preconditions of the operators, but do not appear in any of the effects.
public java.util.Set<ai.krr.NamedSymbol> getFluentRelations()
This function returns the Set of all the NamedSymbols that appear as relations in effects of the operators. They may also appear in the preconditions.
public ai.planning.strips.extensible.Extension getExtension(java.lang.Class<? extends ai.planning.strips.extensible.Extension> type)
This function retrieves the extension of the given type that may be used by this Domain. If there is no such extension this function returns null.
type
- the Class of the extension
public void useExtension(ai.planning.strips.extensible.Extension extension)
This function add the given extension to this Domain.
extension
- an extension to this Domainpublic java.util.Set<Domain.DomainType> getDomainTypes()
This function returns the derived set of domain types that have been defined for this Domain.
public Domain.DomainType[] getSignature(ai.krr.NamedSymbol relation)
This function returns the signature for the given relation in this Domain. The returned array describes the DomainTypes used for the arguments of the given relation in this Domain.
relation
- the NamedSymbol idetifying the relation
public boolean equals(java.lang.Object obj)
This function tests whether this and the given domain are the same Object.
equals
in class java.lang.Object
obj
- the Object this Domain is compared to
public int hashCode()
This function returns a hash value for this domain.
hashCode
in class java.lang.Object
public java.lang.String toString()
This function creates a String representation for this Domain. This is basically the String representing the contained List of ActionTypes.
toString
in class java.lang.Object
protected Domain.DomainTypeSystem getDomainTypeSystem()
This function returns the inferred types for this Domain. These will have to be computed the first time this function is called, but are then stored for future re-use.
public static Domain forName(ai.krr.NamedSymbol name)
This function returns the Domain that has been associated with the given name.
public static Domain read(java.io.Reader r, inf.compilers.SyntaxAdaptor<Domain> sa) throws inf.compilers.ExpressivenessException, java.text.ParseException, java.io.IOException
This function attempts to read and parse a Domain from the given Reader. The syntax used for parsing the Domain is determined by the given SyntaxAdaptor.
r
- the Reader from which the Domain definition is takensa
- the SyntaxAdaptor that performs the parsing of the Domain
inf.compilers.ExpressivenessException
java.text.ParseException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |