Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.stats
Class Element

java.lang.Object
  extended by com.jivesoftware.base.stats.Element
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
DateElement, InfiniteElement, LongElement, StringElement

public abstract class Element
extends java.lang.Object
implements java.lang.Comparable

Data values used to build reports are wrapped as elements. This wrapping servers a number of useful purposes:


Constructor Summary
Element()
           
 
Method Summary
abstract  Element getInstance(long n)
          Returns an instance of this class with an initial value of n.
abstract  java.lang.Object getValue()
          Returns the internal object we're wrapping.
 java.lang.Long toLong()
          Returns a Long representation of this element's value.
 java.lang.String toString()
          Returns a String representation of this element's value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

Element

public Element()
Method Detail

getValue

public abstract java.lang.Object getValue()
Returns the internal object we're wrapping.

Returns:
the internal object we're wrapping.

getInstance

public abstract Element getInstance(long n)
Returns an instance of this class with an initial value of n. This method will return null if it is not implemented.

Parameters:
n - a long this element should wrap.
Returns:
an Element wrapping a long.

toLong

public java.lang.Long toLong()
Returns a Long representation of this element's value. This method will return null if the conversion to a Long fails.

Returns:
the value of this element as a Long or null if the element can not be converted to a Long.

toString

public java.lang.String toString()
Returns a String representation of this element's value.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this element's value.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.