|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.base.stats.Element
com.jivesoftware.base.stats.element.InfiniteElement
public class InfiniteElement
InfiniteElement is a special Element used to represent the largest and smallest possible elements. The only two instances of InfiniteElement are two static objects, INFINITY and MINUS_INFINITY. Each of these objects are exposed as InfiniteElement.INFINITY and InfiniteElement.MINUS_INFINITY. The compareTo function handles comparisons between the InfiniteElements and other Elements. Other elements should defer to the InfiniteElement compareTo when comparing to an InfiniteElement.
| Field Summary | |
|---|---|
static Element |
INFINITY
|
static Element |
MINUS_INFINITY
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
Compare an InifiniteElement to another Element. |
boolean |
equals(java.lang.Object o)
Returns true if the given object equals this object, false otherwise. |
Element |
getInstance(long n)
Generates a new instance of InfiniteElement. |
java.lang.Object |
getValue()
Returns the internal object we're wrapping. |
int |
hashCode()
Generates a hashCode so we can use InfiniteElements in hash tables |
java.lang.Long |
toLong()
Alwyas returns null for an InfiniteElement. |
java.lang.String |
toString()
Converts an InfiniteElement to a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Element INFINITY
public static final Element MINUS_INFINITY
| Method Detail |
|---|
public java.lang.Long toLong()
toLong in class Elementpublic java.lang.Object getValue()
Element
getValue in class Elementpublic Element getInstance(long n)
getInstance in class Elementn - a long this element should wrap.
public java.lang.String toString()
toString in class Elementpublic int compareTo(java.lang.Object obj)
if (o instanceof InfiniteElement) {
return -((InfiniteElement)o).compareTo(this);
}
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||