Package org.prolog4j
Interface SolutionIterator<S>
-
- Type Parameters:
S
- the type of the values of the variable that is of special interest
- All Superinterfaces:
Iterator<S>
public interface SolutionIterator<S> extends Iterator<S>
The SolutionIterator interface servers for traversing the solutions of a Prolog query. In a solution several variables can get bound. S is the type of the values of the variable that the is of special interest. Its values are returned by next(). The values of the other variables can be accessed by the get() methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <A> A
get(String variable)
Returns the value of the variable bound by the current solution.<A> A
get(String variable, Class<A> type)
Returns the value of the variable bound by the current solution.-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
get
<A> A get(String variable)
Returns the value of the variable bound by the current solution.- Type Parameters:
A
- the type of the value- Parameters:
variable
- the name of the variable- Returns:
- the value of the variable in the current solution
-
get
<A> A get(String variable, Class<A> type)
Returns the value of the variable bound by the current solution. The required type of the value can be specified explicitly. This is useful when not the default type is desired.- Type Parameters:
A
- the type of the value- Parameters:
variable
- the name of the variabletype
- the type which the value should be converted to- Returns:
- the value of the variable in the current solution
-
-