prefuse.data.expression
Class ColumnExpression

java.lang.Object
  extended by prefuse.data.expression.AbstractExpression
      extended by prefuse.data.expression.ColumnExpression
All Implemented Interfaces:
java.util.EventListener, ExpressionListener, Expression, Predicate
Direct Known Subclasses:
HoverPredicate, StartVisiblePredicate, ValidatedPredicate, VisiblePredicate

public class ColumnExpression
extends AbstractExpression
implements Predicate

Expression instance that returns the value stored in a Tuple data field.

Author:
jeffrey heer

Field Summary
protected  java.lang.String m_field
           
 
Constructor Summary
ColumnExpression(java.lang.String field)
          Create a new ColumnExpression.
 
Method Summary
 java.lang.Object get(Tuple t)
          By default, throws an UnsupportedOperationException.
 boolean getBoolean(Tuple t)
          By default, throws an UnsupportedOperationException.
 java.lang.String getColumnName()
          Get the column / data field name used by this expression.
 double getDouble(Tuple t)
          By default, throws an UnsupportedOperationException.
 float getFloat(Tuple t)
          By default, throws an UnsupportedOperationException.
 int getInt(Tuple t)
          By default, throws an UnsupportedOperationException.
 long getLong(Tuple t)
          By default, throws an UnsupportedOperationException.
 java.lang.Class getType(Schema s)
          Returns the type that this expression evaluates to when tuples with the given Schema are provided as input.
 java.lang.String toString()
           
 
Methods inherited from class prefuse.data.expression.AbstractExpression
addChildListeners, addExpressionListener, expressionChanged, fireExpressionChange, hasListeners, removeChildListeners, removeExpressionListener, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface prefuse.data.expression.Expression
addExpressionListener, removeExpressionListener, visit
 

Field Detail

m_field

protected final java.lang.String m_field
Constructor Detail

ColumnExpression

public ColumnExpression(java.lang.String field)
Create a new ColumnExpression.

Parameters:
field - the column / data field name to use
Method Detail

getColumnName

public java.lang.String getColumnName()
Get the column / data field name used by this expression.

Returns:
the column / data field name

getType

public java.lang.Class getType(Schema s)
Description copied from interface: Expression
Returns the type that this expression evaluates to when tuples with the given Schema are provided as input.

Specified by:
getType in interface Expression
See Also:
Expression.getType(prefuse.data.Schema)

get

public java.lang.Object get(Tuple t)
Description copied from class: AbstractExpression
By default, throws an UnsupportedOperationException.

Specified by:
get in interface Expression
Overrides:
get in class AbstractExpression
Parameters:
t - the input Tuple
Returns:
the Expression return value, as an Object
See Also:
Expression.get(prefuse.data.Tuple)

getInt

public int getInt(Tuple t)
Description copied from class: AbstractExpression
By default, throws an UnsupportedOperationException.

Specified by:
getInt in interface Expression
Overrides:
getInt in class AbstractExpression
Parameters:
t - the input Tuple
Returns:
the Expression return value, as an int
See Also:
Expression.getInt(prefuse.data.Tuple)

getLong

public long getLong(Tuple t)
Description copied from class: AbstractExpression
By default, throws an UnsupportedOperationException.

Specified by:
getLong in interface Expression
Overrides:
getLong in class AbstractExpression
Parameters:
t - the input Tuple
Returns:
the Expression return value, as a long
See Also:
Expression.getLong(prefuse.data.Tuple)

getFloat

public float getFloat(Tuple t)
Description copied from class: AbstractExpression
By default, throws an UnsupportedOperationException.

Specified by:
getFloat in interface Expression
Overrides:
getFloat in class AbstractExpression
Parameters:
t - the input Tuple
Returns:
the Expression return value, as a float
See Also:
Expression.getFloat(prefuse.data.Tuple)

getDouble

public double getDouble(Tuple t)
Description copied from class: AbstractExpression
By default, throws an UnsupportedOperationException.

Specified by:
getDouble in interface Expression
Overrides:
getDouble in class AbstractExpression
Parameters:
t - the input Tuple
Returns:
the Expression return value, as a double
See Also:
Expression.getDouble(prefuse.data.Tuple)

getBoolean

public boolean getBoolean(Tuple t)
Description copied from class: AbstractExpression
By default, throws an UnsupportedOperationException.

Specified by:
getBoolean in interface Expression
Overrides:
getBoolean in class AbstractExpression
Parameters:
t - the input Tuple
Returns:
the Expression return value, as a boolean
See Also:
Expression.getBoolean(prefuse.data.Tuple)

toString

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


Copyright © 2007 Regents of the University of California