org.deri.iris.api.basics
Interface ITuple

All Superinterfaces:
Collection<ITerm>, Comparable<ITuple>, Iterable<ITerm>, List<ITerm>
All Known Implementing Classes:
Tuple

public interface ITuple
extends List<ITerm>, Comparable<ITuple>

Represents a tuple. A tuple is a list of terms which represents a record in a relation.

$Id: ITuple.java,v 1.14 2007-10-19 07:37:15 poettler_ric Exp $

Version:
$Revision: 1.14 $
Author:
Darko Anicic, DERI Innsbruck, Richard P??ttler (richard dot poettler at deri dot at)

Method Summary
 ITuple append(Collection<? extends ITerm> t)
          Creates a new tupel with the tuples of this one and appends the tuples of the submitted list at the end.
 List<IVariable> getAllVariables()
          Returns all variables from this tupple.
 Set<IVariable> getVariables()
          Returns all distinct variables from this tupple.
 boolean isGround()
          Checks whether this tuple contains only ground terms.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

isGround

boolean isGround()
Checks whether this tuple contains only ground terms.

Returns:
true if all terms of this tuple are grounded; false otherwise.

getVariables

Set<IVariable> getVariables()
Returns all distinct variables from this tupple.

Returns:
All distinct variables from this tupple.

getAllVariables

List<IVariable> getAllVariables()
Returns all variables from this tupple.

Returns:
All variables from this tupple.

append

ITuple append(Collection<? extends ITerm> t)
Creates a new tupel with the tuples of this one and appends the tuples of the submitted list at the end.

Parameters:
t - the tuples to add
Returns:
the newly created tuple
Throws:
IllegalArgumentException - if the list is null