|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.base.stats.Bin
com.jivesoftware.base.stats.bin.Interval
public class Interval
Interval is a Bin that represents an open, closed, or half-open interval. The Interval class requires that elements have a working toLong() function.
Constructor Summary | |
---|---|
Interval(Element begin,
Element end,
boolean containsBegin,
boolean containsEnd)
Creates new Interval extending from begin to end. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
Compare the Interval to another Bin (will throw a ClassCastException if o is not a Bin). |
boolean |
contains(Bin b)
Determine whether the Interval contains the given Bin. |
boolean |
contains(Element e)
Determine whether the Interval contains the given Element. |
boolean |
containsBegin()
Test to see if the Interval contains its first element (used to enable us to create open intervals, closed intervals, and half-open intervals). |
boolean |
containsEnd()
Test to see if the Interval contains its last element (used to enable us to create open intervals, closed intervals, and half-open intervals). |
boolean |
equals(java.lang.Object o)
Determine whether two Intervals are the same. |
Element |
getBegin()
Get the first element in the Interval |
Element |
getEnd()
Get the last element in the Interval |
int |
hashCode()
Provide a suitable hashCode so that Intervals can be used with HashMaps |
java.lang.String |
toString()
Convert the Interval to a string. |
Methods inherited from class com.jivesoftware.base.stats.Bin |
---|
getProperty, setProperty |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Interval(Element begin, Element end, boolean containsBegin, boolean containsEnd)
begin
- The first element in the Intervalend
- The last element in the IntervalcontainsBegin
- True if the Interval contains the first elementcontainsEnd
- True if the interval contains the last elementMethod Detail |
---|
public java.lang.String toString()
toString
in class Bin
Object.toString()
public boolean contains(Bin b)
contains
in class Bin
b
- Bin to be tested
public boolean contains(Element e)
contains
in class Bin
e
- Element to be testedpublic int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
compareTo
in class Bin
o
- Object to be compared to
Comparable.compareTo(java.lang.Object)
public Element getBegin()
getBegin
in class Bin
public boolean containsBegin()
containsBegin
in class Bin
public Element getEnd()
getEnd
in class Bin
public boolean containsEnd()
containsEnd
in class Bin
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |