public final class ConditionalValue extends Object implements com.gembox.internal.core.Equatable<ConditionalValue>
ColorScaleCondition
, DataBarCondition
and IconSetCondition
).Modifier and Type | Field and Description |
---|---|
static ConditionalValue |
AUTOMATIC
|
static ConditionalValue |
HIGHEST
|
static ConditionalValue |
LOWEST
|
static ConditionalValue |
NONE
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Determines whether the specified
java.lang.Object is equal to this ConditionalValue instance. |
boolean |
equalsGeneric(ConditionalValue other)
|
static ConditionalValue |
fromFormula(String formula)
Creates a new instance of the
ConditionalValue from the specified formula. |
static ConditionalValue |
fromNumber(double number)
Creates a new instance of the
ConditionalValue from the specified number. |
static ConditionalValue |
fromPercent(double percent)
Creates a new instance of the
ConditionalValue from the specified percent. |
static ConditionalValue |
fromPercentile(double percentile)
Creates a new instance of the
ConditionalValue from the specified percentile. |
Object |
getValue()
Gets the value.
|
ConditionalValueType |
getValueType()
Gets the conditional value type.
|
int |
hashCode()
Returns a hash code for this
ConditionalValue instance. |
String |
toString()
Returns a
String that represents this ConditionalValue instance. |
public static final ConditionalValue AUTOMATIC
public static final ConditionalValue HIGHEST
public static final ConditionalValue LOWEST
public static final ConditionalValue NONE
public boolean equals(Object obj)
java.lang.Object
is equal to this ConditionalValue
instance.equals
in class Object
obj
- The java.lang.Object
to compare with this ConditionalValue
instance.true
if the specified java.lang.Object
is a ConditionalValue
and is equal to this ConditionalValue
instance; otherwise, false
.public boolean equalsGeneric(ConditionalValue other)
equalsGeneric
in interface com.gembox.internal.core.Equatable<ConditionalValue>
other
- The other ConditionalValue
to compare with this ConditionalValue
instance.true
if the other
ConditionalValue
is equal to this ConditionalValue
instance; otherwise, false
.public static ConditionalValue fromFormula(String formula)
ConditionalValue
from the specified formula.formula
- The formula value.ConditionalValue
whose value type
is equal to ConditionalValueType.FORMULA
and value
is equal to formula
parameter.IllegalArgumentException
- Formula value is null
or empty string.public static ConditionalValue fromNumber(double number)
ConditionalValue
from the specified number.number
- The number value.ConditionalValue
whose value type
is equal to ConditionalValueType.NUMBER
and value
is equal to number
parameter.public static ConditionalValue fromPercent(double percent)
ConditionalValue
from the specified percent.percent
- The percent value.ConditionalValue
whose value type
is equal to ConditionalValueType.PERCENT
and value
is equal to percent
parameter.IndexOutOfBoundsException
- Percent value is less than 0 or greater than 100.public static ConditionalValue fromPercentile(double percentile)
ConditionalValue
from the specified percentile.percentile
- The percentile value.ConditionalValue
whose value type
is equal to ConditionalValueType.PERCENTILE
and value
is equal to percentile
parameter.IndexOutOfBoundsException
- Percentile value is less than 0 or greater than 100.public Object getValue()
Value is
null
if getValueType()
is equal to ConditionalValueType.NONE
, ConditionalValueType.AUTOMATIC
, ConditionalValueType.LOWEST
or ConditionalValueType.HIGHEST
.double
if getValueType()
is equal to ConditionalValueType.NUMBER
, ConditionalValueType.PERCENT
or ConditionalValueType.PERCENTILE
.String
if getValueType()
is equal to ConditionalValueType.FORMULA
.public ConditionalValueType getValueType()
public int hashCode()
ConditionalValue
instance.hashCode
in class Object
ConditionalValue
instance.public String toString()
String
that represents this ConditionalValue
instance.
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).
toString
in class Object
String
that represents this ConditionalValue
instance.© GemBox Ltd. — All rights reserved.