Package com.attivio.sdk.search.facet
Class FacetRange
- java.lang.Object
-
- com.attivio.sdk.search.facet.FacetRange
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class FacetRange extends java.lang.Object implements java.lang.Cloneable, java.io.SerializableDefines a range of values to generate a FacetBucket for.NOTE: the lower bounds of the range is inclusive, while the upper bounds is exclusive.
NOTE: A range bucket's primary sort value is the upper bounds of the range. The secondary sort value is the range's lower bounds.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static FacetRange[]EMPTY_ARRAY
-
Constructor Summary
Constructors Constructor Description FacetRange()FacetRange(java.lang.Number minValue, java.lang.Number maxValue)Construct a new FacetRange.FacetRange(java.lang.String label)FacetRange(java.lang.String label, java.lang.Number minValue, java.lang.Number maxValue)Construct a new FacetRange.FacetRange(java.lang.String label, java.util.Date minValue, java.util.Date maxValue)Construct a new FacetRange.FacetRange(java.util.Date minValue, java.util.Date maxValue)Construct a new FacetRange.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FacetRangeclone()protected static java.lang.Numbercoerce(java.lang.Number value)Coerce numbers to have consistent type.booleanequals(java.lang.Object other)java.lang.StringgetLabel()Get the optional label for this range.protected java.lang.LonggetMaxDate()protected java.lang.NumbergetMaxNumber()JSON SUPPORT FOLLOWSjava.lang.ObjectgetMaxValue()Get the maximum value for this range (or null if unbounded) [exclusive].protected java.lang.LonggetMinDate()protected java.lang.NumbergetMinNumber()java.lang.ObjectgetMinValue()Get the minimum value for this range (or null if unbounded) [inclusive].inthashCode()voidsetLabel(java.lang.String value)Set the optional label for this range.protected voidsetMaxDate(java.lang.Long value)protected voidsetMaxNumber(java.lang.String value)voidsetMaxValue(java.lang.Number value)Set the maximum value for this range (or null if unbounded) [inclusive].voidsetMaxValue(java.util.Date value)Set the maximum value for this range (or null if unbounded) [inclusive].protected voidsetMinDate(java.lang.Long value)protected voidsetMinNumber(java.lang.String value)voidsetMinValue(java.lang.Number value)Set the minimum value for this range (or null if unbounded) [inclusive].voidsetMinValue(java.util.Date value)Set the minimum value for this range (or null if unbounded) [inclusive].protected static java.util.DatetoDate(java.lang.Long value)protected static java.lang.LongtoDate(java.lang.Object value)protected static java.math.BigDecimaltoDecimal(java.lang.String value)protected static java.lang.NumbertoNumber(java.lang.Object value)PhraseTermtoPhrase()Get aPhrasesuitable for matching this range.java.lang.StringtoString()
-
-
-
Field Detail
-
EMPTY_ARRAY
public static final FacetRange[] EMPTY_ARRAY
-
-
Constructor Detail
-
FacetRange
public FacetRange()
-
FacetRange
public FacetRange(java.lang.String label)
-
FacetRange
public FacetRange(java.lang.Number minValue, java.lang.Number maxValue)Construct a new FacetRange.
-
FacetRange
public FacetRange(java.util.Date minValue, java.util.Date maxValue)Construct a new FacetRange.
-
FacetRange
public FacetRange(java.lang.String label, java.lang.Number minValue, java.lang.Number maxValue)Construct a new FacetRange.
-
FacetRange
public FacetRange(java.lang.String label, java.util.Date minValue, java.util.Date maxValue)Construct a new FacetRange.
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Get the optional label for this range.
-
setLabel
public void setLabel(java.lang.String value)
Set the optional label for this range.
-
getMinValue
public java.lang.Object getMinValue()
Get the minimum value for this range (or null if unbounded) [inclusive].
-
setMinValue
public void setMinValue(java.lang.Number value)
Set the minimum value for this range (or null if unbounded) [inclusive].
-
setMinValue
public void setMinValue(java.util.Date value)
Set the minimum value for this range (or null if unbounded) [inclusive].
-
getMaxValue
public java.lang.Object getMaxValue()
Get the maximum value for this range (or null if unbounded) [exclusive].
-
setMaxValue
public void setMaxValue(java.lang.Number value)
Set the maximum value for this range (or null if unbounded) [inclusive].
-
setMaxValue
public void setMaxValue(java.util.Date value)
Set the maximum value for this range (or null if unbounded) [inclusive].
-
toPhrase
public PhraseTerm toPhrase()
Get aPhrasesuitable for matching this range.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
clone
public FacetRange clone()
- Overrides:
clonein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
coerce
protected static java.lang.Number coerce(java.lang.Number value)
Coerce numbers to have consistent type.
-
getMaxNumber
protected java.lang.Number getMaxNumber()
JSON SUPPORT FOLLOWS
-
getMinNumber
protected java.lang.Number getMinNumber()
-
setMinNumber
protected void setMinNumber(java.lang.String value)
-
setMaxNumber
protected void setMaxNumber(java.lang.String value)
-
getMinDate
protected java.lang.Long getMinDate()
-
getMaxDate
protected java.lang.Long getMaxDate()
-
setMinDate
protected void setMinDate(java.lang.Long value)
-
setMaxDate
protected void setMaxDate(java.lang.Long value)
-
toDecimal
protected static java.math.BigDecimal toDecimal(java.lang.String value)
-
toNumber
protected static java.lang.Number toNumber(java.lang.Object value)
-
toDate
protected static java.lang.Long toDate(java.lang.Object value)
-
toDate
protected static java.util.Date toDate(java.lang.Long value)
-
-