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

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

public final class Tuple<T>
extends Object
implements Iterable<T>

Tuple class - tuples are immutable and must be created initialized


Method Summary
 List<T> asList()
           
 int countNotNull()
           
static
<X> Tuple<X>
create(X... elements)
           
 boolean equals(Object other)
          Equality of tuples is based on equality of the elements in the tuple
 T get(int idx)
           
 int hashCode()
           
 Iterator<T> iterator()
           
 Tuple<T> map(ColumnMap colMap)
          Return a tuple with the column mapping applied
static
<T> Iterator<Tuple<T>>
prefix(int prefixLength, Iterator<Tuple<T>> iter)
           
static
<T> Iterator<T>
project(int slot, Iterator<Tuple<T>> iter)
           
 int size()
           
 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> Iterator<T> project(int slot,
                                      Iterator<Tuple<T>> iter)

prefix

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

get

public T get(int idx)

countNotNull

public int countNotNull()

asList

public List<T> asList()

tuple

public T[] tuple()

tupleCopy

public T[] tupleCopy()

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface 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 Object

equals

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

Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Licenced under the Apache License, Version 2.0