Package edu.tufts.hrilab.fol
Class Symbol
java.lang.Object
edu.tufts.hrilab.fol.Symbol
- All Implemented Interfaces:
Serializable
,Cloneable
Representation of symbol logical form.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
boolean
Compare without checking semantic type information.getName()
Get name as String.getType()
Get type as String.boolean
hasArgs()
Checks if this symbol has arguments.int
hashCode()
boolean
hasType()
Returns if type has been set.boolean
boolean
boolean
isTerm()
boolean
void
Deprecated.toString()
Constructs a String representation that includes type information, if available.Returns a FOL instance that is not negated (i.e., drops outer "not" if it exists).Constructs a String representation that does not include type information.
-
Field Details
-
name
-
type
-
-
Constructor Details
-
Symbol
-
Symbol
-
Symbol
Deprecated.
-
-
Method Details
-
getName
Get name as String.- Returns:
-
setName
Deprecated.Set name.- Parameters:
n
-
-
getType
Get type as String.- Returns:
-
hasType
public boolean hasType()Returns if type has been set.- Returns:
-
equalsIgnoreType
Compare without checking semantic type information.- Parameters:
o
-- Returns:
-
equals
-
hashCode
public int hashCode() -
toString
Constructs a String representation that includes type information, if available. If no type information is available it will be ignored. Strings will be of the form: "name:type(arg0:typ0,..., argN:typeN)". -
toUntypedString
Constructs a String representation that does not include type information.- Returns:
- String of the form "name(arg0,..., argN)"
-
toUnnegatedForm
Returns a FOL instance that is not negated (i.e., drops outer "not" if it exists). This doesn't apply to the Symbol class which can't be negated, but is here as a convenience so that Term/Predicate instances passed as Symbols (e.g., via getArgs) don't need to be cast to Term/Predicate.- Returns:
- Un-negated form of this FOL class.
-
clone
-
hasArgs
public boolean hasArgs()Checks if this symbol has arguments.- Returns:
- always false since Symbol doesn't support arguments
-
isVariable
public boolean isVariable() -
isConstant
public boolean isConstant() -
isTerm
public boolean isTerm() -
isPredicate
public boolean isPredicate()
-