org.novadeck.jxla.data
Class SimpleData

java.lang.Object
  |
  +--org.novadeck.jxla.data.SerializableSimpleData
        |
        +--org.novadeck.jxla.data.SimpleData
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
RegexpData, SearchEngine, StringData

public class SimpleData
extends SerializableSimpleData
implements java.lang.Comparable

This class acts like a counter

See Also:
Serialized Form

Constructor Summary
SimpleData()
          create a counter with an initial value of 0
SimpleData(long l)
          create a counter with an initial value
 
Method Summary
 void add(long l)
          increments current value by more than one
 int compareTo(java.lang.Object obj)
          to order Objects by counter decreasing
 long getCount()
          get the count value
 void inc()
          increments the current value by 1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleData

public SimpleData()
create a counter with an initial value of 0

SimpleData

public SimpleData(long l)
create a counter with an initial value
Parameters:
l - initila value of the counter
Method Detail

getCount

public long getCount()
get the count value
Returns:
count value

inc

public void inc()
increments the current value by 1

add

public void add(long l)
increments current value by more than one
Parameters:
l - value to add ti the counter

compareTo

public int compareTo(java.lang.Object obj)
to order Objects by counter decreasing
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - element to compare to
Returns:
if obj is before of after current object