Package fr.uga.pddl4j.parser
Class AbstractParsedObject
java.lang.Object
fr.uga.pddl4j.parser.AbstractParsedObject
- All Implemented Interfaces:
ParsedObject
,Serializable
- Direct Known Subclasses:
ParsedAbstractOperator
,ParsedDerivedPredicate
This abstract class implements the common methods of all object produced by the parser.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface fr.uga.pddl4j.parser.ParsedObject
DEFAULT_BEGIN_LINE, DEFAULT_BEGING_COLUMN, DEFAULT_END_COLUMN, DEFAULT_END_LINE
-
Constructor Summary
ConstructorDescriptionCreates a default object.AbstractParsedObject(int beginLine, int beginColumn, int endLine, int endColumn)
Creates a new locatable object with a specified begin line and column and a specified end line and column.Creates a parser object from another. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the begin column of the file where this object appear.int
Returns the begin line of the file where this object appears.int
Returns the end column of the file where this object appears.int
Returns the end line of the file where this object appears.void
setBegin(fr.uga.pddl4j.parser.lexer.Token begin)
Sets the begin line and column of the expression from a specified token.void
setBeginColumn(int beginColumn)
Sets the begin column of the file where this object appears.void
setBeginLine(int beginLine)
Sets the begin line of the file where this object appears.void
setEnd(fr.uga.pddl4j.parser.lexer.Token end)
Sets the end line and column of the expression from a specified token.void
setEndColumn(int endColumn)
Sets the end column of the file where this object appears.void
setEndLine(int endLine)
Sets the end line of the file where this object appears.
-
Constructor Details
-
AbstractParsedObject
public AbstractParsedObject(int beginLine, int beginColumn, int endLine, int endColumn)Creates a new locatable object with a specified begin line and column and a specified end line and column.- Parameters:
beginLine
- the begin line.beginColumn
- the begin column.endLine
- the end line.endColumn
- the end column.
-
AbstractParsedObject
public AbstractParsedObject()Creates a default object. -
AbstractParsedObject
Creates a parser object from another. This constructor creates a deep copy.- Parameters:
other
- the other object to be copied.
-
-
Method Details
-
getBeginLine
public final int getBeginLine()Returns the begin line of the file where this object appears. The return valueDEFAULT_BEGIN_LIN
indicates that the attribute was not initialized.- Specified by:
getBeginLine
in interfaceParsedObject
- Returns:
- the begin line of the file where this object appears or
DEFAULT_BEGIN_LINE
if it was not initialized.
-
setBeginLine
public final void setBeginLine(int beginLine)Sets the begin line of the file where this object appears.- Specified by:
setBeginLine
in interfaceParsedObject
- Parameters:
beginLine
- the begin line of the object in the file.
-
getBeginColumn
public final int getBeginColumn()Returns the begin column of the file where this object appear. The return valueDEFAULT_BEGIN_COLUMN
indicates that the attribute was not initialized.- Specified by:
getBeginColumn
in interfaceParsedObject
- Returns:
- the begin column of the file where this object appears or
DEFAULT_BEGIN_COLUMN
if it was not initialized.
-
setBeginColumn
public final void setBeginColumn(int beginColumn)Sets the begin column of the file where this object appears.- Specified by:
setBeginColumn
in interfaceParsedObject
- Parameters:
beginColumn
- the begin column of the file where this object appears.
-
getEndLine
public final int getEndLine()Returns the end line of the file where this object appears. The return valueDEFAULT_EN_LINE
indicates that the attribute was not initialized.- Specified by:
getEndLine
in interfaceParsedObject
- Returns:
- the end line of the file where this object appears or
DEFAULT_EN_LINE
if it was not initialized.
-
setEndLine
public final void setEndLine(int endLine)Sets the end line of the file where this object appears.- Specified by:
setEndLine
in interfaceParsedObject
- Parameters:
endLine
- the end line of the file where this object appeasr.
-
getEndColumn
public final int getEndColumn()Returns the end column of the file where this object appears. The return valueDEFAULT_END_COLUMN
indicates that the attribute was not initialized.- Specified by:
getEndColumn
in interfaceParsedObject
- Returns:
- the end column of the file where this object appears or
DEFAULT_END_COLUMN
if it was not initialized.
-
setEndColumn
public final void setEndColumn(int endColumn)Sets the end column of the file where this object appears.- Specified by:
setEndColumn
in interfaceParsedObject
- Parameters:
endColumn
- the end column of the file where this object appears.
-
setBegin
public final void setBegin(fr.uga.pddl4j.parser.lexer.Token begin)Sets the begin line and column of the expression from a specified token.- Specified by:
setBegin
in interfaceParsedObject
- Parameters:
begin
- the first token of the expression.
-
setEnd
public final void setEnd(fr.uga.pddl4j.parser.lexer.Token end)Sets the end line and column of the expression from a specified token.- Specified by:
setEnd
in interfaceParsedObject
- Parameters:
end
- the last token of the expression.
-