|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.util.collections.AbstractLiteralIterator prefuse.util.collections.IntIterator prefuse.data.util.TableIterator
public class TableIterator
An iterator over table rows, providing convenience methods for accessing and manipulating table data.
Field Summary | |
---|---|
protected int |
m_cur
|
Constructor Summary | |
---|---|
TableIterator(Table table,
IntIterator rows)
Create a new TableIterator using a given iterator over table rows. |
Method Summary | |
---|---|
boolean |
canGet(java.lang.String field,
java.lang.Class type)
Check if the get method for the given data field returns
values that are compatible with a given target type. |
boolean |
canGetBoolean(java.lang.String field)
Check if the given data field can return primitive boolean
values. |
boolean |
canGetDate(java.lang.String field)
Check if the given data field can return Date
values. |
boolean |
canGetDouble(java.lang.String field)
Check if the given data field can return primitive double
values. |
boolean |
canGetFloat(java.lang.String field)
Check if the given data field can return primitive float
values. |
boolean |
canGetInt(java.lang.String field)
Check if the given data field can return primitive int
values. |
boolean |
canGetLong(java.lang.String field)
Check if the given data field can return primitive long
values. |
boolean |
canGetString(java.lang.String field)
Check if the given data field can return String
values. |
boolean |
canSet(java.lang.String field,
java.lang.Class type)
Check if the set method for the given data field can
accept values of a given target type. |
boolean |
canSetBoolean(java.lang.String field)
Check if the setBoolean method can safely be used for the
given data field. |
boolean |
canSetDate(java.lang.String field)
Check if the setDate method can safely be used for the
given data field. |
boolean |
canSetDouble(java.lang.String field)
Check if the setDouble method can safely be used for the
given data field. |
boolean |
canSetFloat(java.lang.String field)
Check if the setFloat method can safely be used for the
given data field. |
boolean |
canSetInt(java.lang.String field)
Check if the setInt method can safely be used for the
given data field. |
boolean |
canSetLong(java.lang.String field)
Check if the setLong method can safely be used for the
given data field. |
boolean |
canSetString(java.lang.String field)
Check if the setString method can safely be used for the
given data field. |
java.lang.Object |
get(java.lang.String field)
Get the data value at the given field as an Object. |
boolean |
getBoolean(java.lang.String field)
Get the data value at the given field as a boolean . |
java.util.Date |
getDate(java.lang.String field)
Get the data value at the given field as a Date . |
double |
getDouble(java.lang.String field)
Get the data value at the given field as a double . |
float |
getFloat(java.lang.String field)
Get the data value at the given field as a float . |
int |
getInt(java.lang.String field)
Get the data value at the given field as an int . |
long |
getLong(java.lang.String field)
Get the data value at the given field as a long . |
java.lang.String |
getString(java.lang.String field)
Get the data value at the given field as a String . |
boolean |
hasNext()
|
protected void |
modify()
Tracks table modifications. |
int |
nextInt()
Returns the next table row. |
void |
remove()
Remove the current row, deleting it from the table. |
void |
set(java.lang.String field,
java.lang.Object val)
Set the value of a given data field. |
void |
setBoolean(java.lang.String field,
boolean val)
Set the data value of the given field with a boolean . |
void |
setDate(java.lang.String field,
java.util.Date val)
Set the data value of the given field with a Date . |
void |
setDouble(java.lang.String field,
double val)
Set the data value of the given field with a double . |
void |
setFloat(java.lang.String field,
float val)
Set the data value of the given field with a float . |
void |
setInt(java.lang.String field,
int val)
Set the data value of the given field with an int . |
void |
setLong(java.lang.String field,
long val)
Set the data value of the given field with a long . |
void |
setString(java.lang.String field,
java.lang.String val)
Set the data value of the given field with a String . |
Methods inherited from class prefuse.util.collections.IntIterator |
---|
isDoubleSupported, isFloatSupported, isIntSupported, isLongSupported, next, nextDouble, nextFloat, nextLong |
Methods inherited from class prefuse.util.collections.AbstractLiteralIterator |
---|
isBooleanSupported, nextBoolean |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int m_cur
Constructor Detail |
---|
public TableIterator(Table table, IntIterator rows)
table
- the Table to iterate overrows
- the iteration over individual table rowsMethod Detail |
---|
public int nextInt()
nextInt
in interface LiteralIterator
nextInt
in class IntIterator
LiteralIterator.nextInt()
public boolean hasNext()
Iterator.hasNext()
public void remove()
Iterator.remove()
protected void modify()
public final boolean canGet(java.lang.String field, java.lang.Class type)
get
method for the given data field returns
values that are compatible with a given target type.
field
- the data field to checktype
- a Class instance to check for compatibility with the
data field values.
get(String)
can be cast to the given type.get(String)
public final boolean canSet(java.lang.String field, java.lang.Class type)
set
method for the given data field can
accept values of a given target type.
field
- the data field to checktype
- a Class instance to check for compatibility with the
data field values.
set(String, Object)
method.set(String, Object)
public final java.lang.Object get(java.lang.String field)
field
- the data field to retrieve
canGet(String, Class)
,
Table.getColumnType(String)
public final void set(java.lang.String field, java.lang.Object val)
field
- the data field to setval
- the value for the field. If the concrete type of this
Object is not compatible with the underlying data model, an
Exception will be thrown. Use the canSet(String, Class)
method to check the type-safety ahead of time.canSet(String, Class)
,
Table.getColumnType(String)
public final boolean canGetInt(java.lang.String field)
int
values.
field
- the data field to check
int
values, false otherwise. If true, the getInt(String)
method
can be used safely.public final boolean canSetInt(java.lang.String field)
setInt
method can safely be used for the
given data field.
field
- the data field to check
setInt(String, int)
method can safely
be used for the given field, false otherwise.public final int getInt(java.lang.String field)
int
.
field
- the data field to retrievecanGetInt(String)
public final void setInt(java.lang.String field, int val)
int
.
field
- the data field to setval
- the value to setcanSetInt(String)
public final boolean canGetLong(java.lang.String field)
long
values.
field
- the data field to check
long
values, false otherwise. If true, the getLong(String)
method
can be used safely.public final boolean canSetLong(java.lang.String field)
setLong
method can safely be used for the
given data field.
field
- the data field to check
setLong(String, long)
method can safely
be used for the given field, false otherwise.public final long getLong(java.lang.String field)
long
.
field
- the data field to retrievecanGetLong(String)
public final void setLong(java.lang.String field, long val)
long
.
field
- the data field to setval
- the value to setcanSetLong(String)
public final boolean canGetFloat(java.lang.String field)
float
values.
field
- the data field to check
float
values, false otherwise. If true, the getFloat(String)
method
can be used safely.public final boolean canSetFloat(java.lang.String field)
setFloat
method can safely be used for the
given data field.
field
- the data field to check
setFloat(String, float)
method can safely
be used for the given field, false otherwise.public final float getFloat(java.lang.String field)
float
.
field
- the data field to retrievecanGetFloat(String)
public final void setFloat(java.lang.String field, float val)
float
.
field
- the data field to setval
- the value to setcanSetFloat(String)
public final boolean canGetDouble(java.lang.String field)
double
values.
field
- the data field to check
double
values, false otherwise. If true, the getDouble(String)
method
can be used safely.public final boolean canSetDouble(java.lang.String field)
setDouble
method can safely be used for the
given data field.
field
- the data field to check
setDouble(String, double)
method can safely
be used for the given field, false otherwise.public final double getDouble(java.lang.String field)
double
.
field
- the data field to retrievecanGetDouble(String)
public final void setDouble(java.lang.String field, double val)
double
.
field
- the data field to setval
- the value to setcanSetDouble(String)
public final boolean canGetBoolean(java.lang.String field)
boolean
values.
field
- the data field to check
boolean
values, false otherwise. If true, the getBoolean(String)
method
can be used safely.public final boolean canSetBoolean(java.lang.String field)
setBoolean
method can safely be used for the
given data field.
field
- the data field to check
setBoolean(String, boolean)
method can
safely be used for the given field, false otherwise.public final boolean getBoolean(java.lang.String field)
boolean
.
field
- the data field to retrievecanGetBoolean(String)
public final void setBoolean(java.lang.String field, boolean val)
boolean
.
field
- the data field to setval
- the value to setcanSetBoolean(String)
public final boolean canGetString(java.lang.String field)
String
values.
field
- the data field to check
String
values, false otherwise. If true, the getString(String)
method
can be used safely.public final boolean canSetString(java.lang.String field)
setString
method can safely be used for the
given data field.
field
- the data field to check
setString(String, String)
method can safely
be used for the given field, false otherwise.public final java.lang.String getString(java.lang.String field)
String
.
field
- the data field to retrievecanGetString(String)
public final void setString(java.lang.String field, java.lang.String val)
String
.
field
- the data field to setval
- the value to setcanSetString(String)
public final boolean canGetDate(java.lang.String field)
Date
values.
field
- the data field to check
Date
values, false otherwise. If true, the getDate(String)
method
can be used safely.public final boolean canSetDate(java.lang.String field)
setDate
method can safely be used for the
given data field.
field
- the data field to check
setDate(String, Date)
method can safely
be used for the given field, false otherwise.public final java.util.Date getDate(java.lang.String field)
Date
.
field
- the data field to retrievecanGetDate(String)
public final void setDate(java.lang.String field, java.util.Date val)
Date
.
field
- the data field to setval
- the value to setcanSetDate(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |