edu.umd.cfar.lamp.viper.util
Class DataMatrices.PassThrough

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.util.DataMatrices.PassThrough
All Implemented Interfaces:
DataMatrices.GetCost
Enclosing class:
DataMatrices

public static class DataMatrices.PassThrough
extends java.lang.Object
implements DataMatrices.GetCost

Assumes Object is an instance of Number, and calls its getLong() method to determine the node cost.


Constructor Summary
DataMatrices.PassThrough()
           
 
Method Summary
 long cost(java.lang.Object obj)
          Gets the longValue of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataMatrices.PassThrough

public DataMatrices.PassThrough()
Method Detail

cost

public long cost(java.lang.Object obj)
Gets the longValue of the object.

Specified by:
cost in interface DataMatrices.GetCost
Parameters:
obj - the object to determine the cost of
Returns:
((Number) obj).longValue()
Throws:
java.lang.ClassCastException - if obj doesn't implement Number