com.datasalt.pangool.io
Class ViewTuple

java.lang.Object
  extended by com.datasalt.pangool.io.ViewTuple
All Implemented Interfaces:
ITuple

public class ViewTuple
extends Object
implements ITuple

A ITuple with a contained one, but that creates a read only view over it and filtering only for some fields. Useful for creating views over ITuple for some particular fields.


Constructor Summary
ViewTuple(Schema schema)
           
ViewTuple(Schema schema, int[] indexTranslation)
           
 
Method Summary
 void clear()
           
 Object get(int pos)
           
 Object get(String field)
           
 Boolean getBoolean(int pos)
           
 Boolean getBoolean(String field)
           
 Double getDouble(int pos)
           
 Double getDouble(String field)
           
 Float getFloat(int pos)
           
 Float getFloat(String field)
           
 Integer getInteger(int pos)
           
 Integer getInteger(String field)
           
 Long getLong(int pos)
           
 Long getLong(String field)
           
 Schema getSchema()
           
 String getString(int pos)
           
 String getString(String field)
           
 void set(int pos, Object object)
           
 void set(String field, Object object)
           
 void setContained(ITuple contained)
           
 void setContained(ITuple delegatedTuple, int[] indexTranslation)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ViewTuple

public ViewTuple(Schema schema)

ViewTuple

public ViewTuple(Schema schema,
                 int[] indexTranslation)
Method Detail

setContained

public void setContained(ITuple delegatedTuple,
                         int[] indexTranslation)

setContained

public void setContained(ITuple contained)

get

public Object get(int pos)
Specified by:
get in interface ITuple

set

public void set(int pos,
                Object object)
Specified by:
set in interface ITuple

clear

public void clear()
Specified by:
clear in interface ITuple

getSchema

public Schema getSchema()
Specified by:
getSchema in interface ITuple

get

public Object get(String field)
Specified by:
get in interface ITuple

set

public void set(String field,
                Object object)
Specified by:
set in interface ITuple

toString

public String toString()
Overrides:
toString in class Object

getInteger

public Integer getInteger(int pos)
Specified by:
getInteger in interface ITuple

getInteger

public Integer getInteger(String field)
Specified by:
getInteger in interface ITuple

getLong

public Long getLong(int pos)
Specified by:
getLong in interface ITuple

getLong

public Long getLong(String field)
Specified by:
getLong in interface ITuple

getFloat

public Float getFloat(int pos)
Specified by:
getFloat in interface ITuple

getFloat

public Float getFloat(String field)
Specified by:
getFloat in interface ITuple

getDouble

public Double getDouble(int pos)
Specified by:
getDouble in interface ITuple

getDouble

public Double getDouble(String field)
Specified by:
getDouble in interface ITuple

getBoolean

public Boolean getBoolean(int pos)
Specified by:
getBoolean in interface ITuple

getBoolean

public Boolean getBoolean(String field)
Specified by:
getBoolean in interface ITuple

getString

public String getString(int pos)
Specified by:
getString in interface ITuple

getString

public String getString(String field)
Specified by:
getString in interface ITuple


Copyright © –2014 Datasalt Systems S.L.. All rights reserved.