Modifier and Type | Field and Description |
---|---|
static String |
LIST_PREDICATE_NAME
A "
. " is the functor name for all lists in Prolog. |
Modifier and Type | Method and Description |
---|---|
static Term |
createList(Collection<? extends Term> terms)
Returns a new
List with the specified terms and a empty list as the final tail element. |
static Term |
createList(Term[] terms)
Returns a new
List with the specified terms and a empty list as the final tail element. |
static Term |
createList(Term[] terms,
Term tail)
Returns a new
List with the specified terms and the second parameter as the tail element. |
static List |
createList(Term head,
Term tail)
Returns a new
List with specified head and tail. |
static Term |
createListOfLength(int length)
Returns a new list of the specified length where is each element is a variable.
|
public static final String LIST_PREDICATE_NAME
.
" is the functor name for all lists in Prolog.public static List createList(Term head, Term tail)
List
with specified head and tail.head
- the first argument in the listtail
- the second argument in the listList
with specified head and tailpublic static Term createList(Collection<? extends Term> terms)
List
with the specified terms and a empty list as the final tail element.terms
- contents of the listList
with the specified terms and a empty list as the final tail elementpublic static Term createList(Term[] terms)
List
with the specified terms and a empty list as the final tail element.
By having a List
with a List
as its tail it is possible to represent an ordered sequence of the
specified terms.
terms
- contents of the listList
with the specified terms and a empty list as the final tail elementpublic static Term createList(Term[] terms, Term tail)
List
with the specified terms and the second parameter as the tail element.
By having a List
with a List
as its tail it is possible to represent an ordered sequence of the
specified terms.
terms
- contents of the listList
with the specified terms and the second parameter as the tail elementpublic static Term createListOfLength(int length)
Copyright © 2024. All rights reserved.