public abstract class AbstractClause extends Object implements PrologClause
PrologClause interface.| Modifier and Type | Field and Description |
|---|---|
protected PrologProvider |
provider |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractClause(PrologProvider provider,
PrologTerm head,
boolean dynamic,
boolean multifile,
boolean discontiguous)
Create a new fact clause.
|
protected |
AbstractClause(PrologProvider provider,
PrologTerm head,
PrologTerm body,
boolean dynamic,
boolean multifile,
boolean discontiguous)
Create a new rule clause.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends PrologClause> |
cast()
Casts the current PrologClause to the class or interface represented by this
Class object. |
boolean |
equals(Object obj) |
PrologTerm |
getArgument(int index)
Term located at some given index position in the clause head arguments.
|
PrologTerm[] |
getArguments()
Term arguments present in the clause head.
|
int |
getArity()
Integer number that represent the arguments number in the clause head.
|
String |
getAuthor()
Get the author tag in doc comment
|
PrologTerm |
getBody()
Prolog term that represent the clause body.
|
PrologTerm[] |
getBodyArray()
Get the clause body as terms array.
|
Iterator<PrologTerm> |
getBodyIterator()
Iterator to iterate over all body terms.
|
String |
getDescription()
Get the description tag in doc comment
|
String |
getFunctor()
String that represent the functor in the clause head.
|
PrologTerm |
getHead()
Prolog term that represent the clause head.
|
String |
getIndicator()
Clause family functor/arity based indicator.
|
PrologIndicator |
getPrologIndicator()
Clause family PrologIndicator based indicator.
|
String |
getSee()
Get the see tag in doc comment
|
String |
getSince()
Get the since tag in doc comment
|
PrologTerm |
getTerm()
Prolog term representation of the current clause.
|
String |
getVersion()
Get the version tag in doc comment
|
boolean |
hasAuthor()
Check if exist author tag in doc comment
|
boolean |
hasDescription()
Check if exist description tag in doc comment
|
boolean |
hasDocumentation()
Check if exist at least one tag like documentation comment
|
int |
hashCode() |
boolean |
hasIndicator(String functor,
int arity)
Check if the current clause have functor/arity based indicator specified by
arguments, false in otherwise.
|
boolean |
hasSee()
Check if exist see tag in doc comment
|
boolean |
hasSince()
Check if exist since tag in doc comment
|
boolean |
hasVersion()
Check if exist version tag in doc comment
|
boolean |
isClause()
True if this element is a clause
|
boolean |
isDirective()
True if this clause is a directive, false in other case.
|
boolean |
isDiscontiguous()
True if this clause is a discontiguos, false in other case
|
boolean |
isDynamic()
True if this clause is a dynamic, false in other case
|
boolean |
isFact()
True if this clause is a fact, false in other case.
|
boolean |
isFunction()
True if this clause is a function, false in other case.
|
boolean |
isMethod()
True if this clause is a rule, false in other case.
|
boolean |
isMultifile()
True if this clause is a multifile, false in other case
|
boolean |
isRule()
True if this clause is a rule, false in other case.
|
boolean |
isTerm()
True if this term is a term
|
void |
setAuthor(String author)
Set the author tag in doc comment
|
void |
setDescription(String description)
Set the description tag in doc comment
|
void |
setSee(String see)
Set the see tag in doc comment
|
void |
setSince(String since)
Set the since tag in doc comment
|
void |
setVersion(String version)
Set the version tag in doc comment
|
String |
toString() |
boolean |
unify(PrologClause clause)
Check that two clauses unify.
|
protected final PrologProvider provider
protected AbstractClause(PrologProvider provider, PrologTerm head, boolean dynamic, boolean multifile, boolean discontiguous)
provider - prolog providerhead - clause headdynamic - true if clause is dynamic, false otherwisemultifile - true if clause is multifile, false otherwisediscontiguous - true if clause is discontiguous, false otherwiseprotected AbstractClause(PrologProvider provider, PrologTerm head, PrologTerm body, boolean dynamic, boolean multifile, boolean discontiguous)
provider - prolog providerhead - clause headbody - clause bodydynamic - true if clause is dynamic, false otherwisemultifile - true if clause is multifile, false otherwisediscontiguous - true if clause is discontiguous, false otherwisepublic PrologTerm getTerm()
PrologClausegetTerm in interface PrologClausepublic final PrologTerm getHead()
PrologClausegetHead in interface PrologClausepublic final PrologTerm getBody()
PrologClausegetBody in interface PrologClausepublic final PrologTerm[] getBodyArray()
PrologClausegetBodyArray in interface PrologClausepublic final Iterator<PrologTerm> getBodyIterator()
PrologClausegetBodyIterator in interface PrologClausepublic final String getFunctor()
PrologClausegetHead().getFunctor().getFunctor in interface PrologClausepublic final int getArity()
PrologClausegetHead().getArity().getArity in interface PrologClausepublic PrologTerm[] getArguments()
PrologClausegetArguments in interface PrologClausepublic PrologTerm getArgument(int index)
PrologClausegetArgument in interface PrologClauseindex - position to retrieve the correspondent term.public final boolean hasIndicator(String functor, int arity)
PrologClausehasIndicator in interface PrologClausefunctor - clause functor to be checkedarity - clause arity to be checkedpublic final String getIndicator()
PrologClausegetIndicator in interface PrologClausepublic final boolean isDirective()
PrologClausegetHead()==null && getBody()!=null.isDirective in interface PrologClausepublic final boolean isFact()
PrologClausegetHead()!=null && getBody()==null.isFact in interface PrologClausepublic final boolean isRule()
PrologClausegetHead()!=null && getBody()!=null.isRule in interface PrologClausepublic boolean isMethod()
PrologClausegetHead()!=null && getBody()!=null.isMethod in interface PrologClausepublic boolean isFunction()
PrologClausegetHead()!=null && getBody()!=null.isFunction in interface PrologClausepublic final boolean isClause()
PrologElementisClause in interface PrologElementpublic final boolean isTerm()
PrologElementisTerm in interface PrologElementpublic final boolean unify(PrologClause clause)
PrologClauseunify in interface PrologClauseclause - the clause to unify with the current clausepublic final boolean isDynamic()
PrologClauseisDynamic in interface PrologClausepublic final boolean isMultifile()
PrologClauseisMultifile in interface PrologClausepublic final boolean isDiscontiguous()
PrologClauseisDiscontiguous in interface PrologClausepublic PrologIndicator getPrologIndicator()
PrologClausegetPrologIndicator in interface PrologClausepublic final <T extends PrologClause> T cast()
PrologClauseClass object.cast in interface PrologClausepublic final String getSee()
PrologDocumentablegetSee in interface PrologDocumentablepublic final void setSee(String see)
PrologDocumentablesetSee in interface PrologDocumentablesee - see for this doc objectpublic final String getSince()
PrologDocumentablegetSince in interface PrologDocumentablepublic final void setSince(String since)
PrologDocumentablesetSince in interface PrologDocumentablesince - since for this doc objectpublic final String getAuthor()
PrologDocumentablegetAuthor in interface PrologDocumentablepublic final void setAuthor(String author)
PrologDocumentablesetAuthor in interface PrologDocumentableauthor - author for this doc objectpublic final String getVersion()
PrologDocumentablegetVersion in interface PrologDocumentablepublic final void setVersion(String version)
PrologDocumentablesetVersion in interface PrologDocumentableversion - version for this doc objectpublic final String getDescription()
PrologDocumentablegetDescription in interface PrologDocumentablepublic final void setDescription(String description)
PrologDocumentablesetDescription in interface PrologDocumentabledescription - description for this doc objectpublic final boolean hasDescription()
PrologDocumentablehasDescription in interface PrologDocumentablepublic final boolean hasVersion()
PrologDocumentablehasVersion in interface PrologDocumentablepublic final boolean hasAuthor()
PrologDocumentablehasAuthor in interface PrologDocumentablepublic final boolean hasSince()
PrologDocumentablehasSince in interface PrologDocumentablepublic final boolean hasSee()
PrologDocumentablehasSee in interface PrologDocumentablepublic final boolean hasDocumentation()
PrologDocumentablehasDocumentation in interface PrologDocumentableCopyright © 2020–2024 Prolobjectlink Project. All rights reserved.