net.floodlightcontroller.counter
Class CounterValue

java.lang.Object
  extended by net.floodlightcontroller.counter.CounterValue

public class CounterValue
extends java.lang.Object

The class defines the counter value type and value

Author:
Kanzhe

Nested Class Summary
static class CounterValue.CounterType
           
 
Field Summary
protected  double doubleValue
           
protected  long longValue
           
protected  CounterValue.CounterType type
           
 
Constructor Summary
CounterValue(CounterValue.CounterType type)
           
 
Method Summary
 double getDouble()
           
 long getLong()
           
 CounterValue.CounterType getType()
           
 void increment(long delta)
          This method is only applicable to type long.
 void setDoubleValue(double value)
           
 void setLongValue(long value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected CounterValue.CounterType type

longValue

protected long longValue

doubleValue

protected double doubleValue
Constructor Detail

CounterValue

public CounterValue(CounterValue.CounterType type)
Method Detail

increment

public void increment(long delta)
This method is only applicable to type long. Setter() should be used for type double


setLongValue

public void setLongValue(long value)

setDoubleValue

public void setDoubleValue(double value)

getLong

public long getLong()

getDouble

public double getDouble()

getType

public CounterValue.CounterType getType()

toString

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