Class ListFactory
java.lang.Object
org.projog.core.term.ListFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA "." is the functor name for all lists in Prolog. -
Method Summary
Modifier and TypeMethodDescriptionstatic TermcreateList(Collection<? extends Term> terms) Returns a newListwith the specified terms and a empty list as the final tail element.static TermcreateList(Term[] terms) Returns a newListwith the specified terms and a empty list as the final tail element.static TermcreateList(Term[] terms, Term tail) Returns a newListwith the specified terms and the second parameter as the tail element.static ListcreateList(Term head, Term tail) Returns a newListwith specified head and tail.static TermcreateListOfLength(int length) Returns a new list of the specified length where is each element is a variable.
-
Field Details
-
LIST_PREDICATE_NAME
A "." is the functor name for all lists in Prolog.- See Also:
-
-
Method Details
-
createList
-
createList
-
createList
Returns a newListwith the specified terms and a empty list as the final tail element.By having a
Listwith aListas its tail it is possible to represent an ordered sequence of the specified terms.- Parameters:
terms- contents of the list- Returns:
- a new
Listwith the specified terms and a empty list as the final tail element
-
createList
Returns a newListwith the specified terms and the second parameter as the tail element.By having a
Listwith aListas its tail it is possible to represent an ordered sequence of the specified terms.- Parameters:
terms- contents of the list- Returns:
- a new
Listwith the specified terms and the second parameter as the tail element
-
createListOfLength
Returns a new list of the specified length where is each element is a variable.
-