org.openjena.atlas.lib
Class Tuple<T>

java.lang.Object
  extended by org.openjena.atlas.lib.Tuple<T>
All Implemented Interfaces:
java.lang.Iterable<T>

public final class Tuple<T>
extends java.lang.Object
implements java.lang.Iterable<T>

Tuple class - tuples are immutable and must be created initialized


Method Summary
 java.util.List<T> asList()
           
 int countNotNull()
           
static
<X> Tuple<X>
create(X... elements)
           
 boolean equals(java.lang.Object other)
          Equality of tuples is based on equality of the elements in the tuple
 T get(int idx)
           
 int hashCode()
           
 java.util.Iterator<T> iterator()
           
 Tuple<T> map(ColumnMap colMap)
          Return a tuple with the column mapping applied
static
<T> java.util.Iterator<Tuple<T>>
prefix(int prefixLength, java.util.Iterator<Tuple<T>> iter)
           
static
<T> java.util.Iterator<T>
project(int slot, java.util.Iterator<Tuple<T>> iter)
           
 int size()
           
 java.lang.String toString()
           
 T[] tuple()
           
 T[] tupleCopy()
           
 Tuple<T> unmap(ColumnMap colMap)
          Return a tuple with the column mapping reversed
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static <X> Tuple<X> create(X... elements)

project

public static <T> java.util.Iterator<T> project(int slot,
                                                java.util.Iterator<Tuple<T>> iter)

prefix

public static <T> java.util.Iterator<Tuple<T>> prefix(int prefixLength,
                                                      java.util.Iterator<Tuple<T>> iter)

get

public T get(int idx)

countNotNull

public int countNotNull()

asList

public java.util.List<T> asList()

tuple

public T[] tuple()

tupleCopy

public T[] tupleCopy()

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>

map

public Tuple<T> map(ColumnMap colMap)
Return a tuple with the column mapping applied


unmap

public Tuple<T> unmap(ColumnMap colMap)
Return a tuple with the column mapping reversed


size

public int size()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Equality of tuples is based on equality of the elements in the tuple

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright ? 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP Copyright ? 2010 Talis Systems Ltd. Copyright ? 2010, 2011 Epimorphics Ltd.