org.openl.meta
Class DoubleValue

java.lang.Object
  extended by java.lang.Number
      extended by org.openl.meta.number.NumberValue<T>
          extended by org.openl.meta.explanation.ExplanationNumberValue<DoubleValue>
              extended by org.openl.meta.DoubleValue
All Implemented Interfaces:
Serializable, Comparable<Number>, INamedThing, ExplanationForNumber<DoubleValue>, IMetaHolder, ITreeElement<DoubleValue>
Direct Known Subclasses:
DoubleValue.DoubleValueOne, DoubleValue.DoubleValueZero, DoubleValuePercent

public class DoubleValue
extends ExplanationNumberValue<DoubleValue>

See Also:
Serialized Form

Nested Class Summary
static class DoubleValue.DoubleValueOne
           
static class DoubleValue.DoubleValueZero
           
 
Nested classes/interfaces inherited from class org.openl.meta.number.NumberValue
NumberValue.ValueType
 
Nested classes/interfaces inherited from interface org.openl.base.INamedThing
INamedThing.NameConverter<T extends INamedThing>, INamedThing.NameSelector, INamedThing.Tool
 
Field Summary
static DoubleValue ONE
           
static DoubleValue ZERO
           
 
Fields inherited from interface org.openl.base.INamedThing
EMPTY, LONG, NAME_CONVERTOR, REGULAR, SHORT
 
Constructor Summary
DoubleValue()
          Deprecated. double value shouldn`t be empty.
DoubleValue(double value)
           
DoubleValue(double value, IMetaInfo metaInfo)
           
DoubleValue(double value, IMetaInfo metaInfo, String format)
          Deprecated. 
DoubleValue(double value, String name)
           
DoubleValue(DoubleValue lv1, DoubleValue lv2, double value, Formulas operand)
          Formula constructor
DoubleValue(DoubleValue result, NumberOperations function, DoubleValue[] params)
          Function constructor
DoubleValue(String valueString)
           
 
Method Summary
static DoubleValue abs(DoubleValue value)
           
static DoubleValue add(DoubleValue value1, DoubleValue value2)
           
static DoubleValue autocast(byte x, DoubleValue y)
           
static DoubleValue autocast(double x, DoubleValue y)
           
static DoubleValue autocast(Double x, DoubleValue y)
           
static BigDecimalValue autocast(DoubleValue x, BigDecimalValue y)
           
static DoubleValue autocast(float x, DoubleValue y)
           
static DoubleValue autocast(int x, DoubleValue y)
           
static DoubleValue autocast(long x, DoubleValue y)
           
static DoubleValue autocast(short x, DoubleValue y)
           
static DoubleValue avg(DoubleValue[] values)
           
static DoubleValue big(DoubleValue[] values, int position)
           
static byte cast(DoubleValue x, byte y)
           
static ByteValue cast(DoubleValue x, ByteValue y)
           
static char cast(DoubleValue x, char y)
           
static double cast(DoubleValue x, double y)
           
static Double cast(DoubleValue x, Double y)
           
static float cast(DoubleValue x, float y)
           
static FloatValue cast(DoubleValue x, FloatValue y)
           
static int cast(DoubleValue x, int y)
           
static IntValue cast(DoubleValue x, IntValue y)
           
static long cast(DoubleValue x, long y)
           
static LongValue cast(DoubleValue x, LongValue y)
           
static short cast(DoubleValue x, short y)
           
static ShortValue cast(DoubleValue x, ShortValue y)
           
 int compareTo(Number o)
           
static DoubleValue copy(DoubleValue value, String name)
           
 DoubleValue copy(String name)
           
static DoubleValue dec(DoubleValue value)
           
static DoubleValue divide(DoubleValue value1, DoubleValue value2)
           
 double doubleValue()
           
static boolean eq(DoubleValue value1, DoubleValue value2)
           
 boolean equals(Object obj)
           
 float floatValue()
           
static boolean ge(DoubleValue value1, DoubleValue value2)
           
 String getFormat()
          Deprecated. 
 double getValue()
           
static boolean gt(DoubleValue value1, DoubleValue value2)
           
 int hashCode()
           
static DoubleValue inc(DoubleValue value)
           
 int intValue()
           
static boolean le(DoubleValue value1, DoubleValue value2)
           
 long longValue()
           
static boolean lt(DoubleValue value1, DoubleValue value2)
           
static DoubleValue max(DoubleValue[] values)
           
static DoubleValue max(DoubleValue value1, DoubleValue value2)
           
static DoubleValue median(DoubleValue[] values)
           
static DoubleValue min(DoubleValue[] values)
           
static DoubleValue min(DoubleValue value1, DoubleValue value2)
           
static DoubleValue mod(DoubleValue number, DoubleValue divisor)
           
static DoubleValue multiply(DoubleValue value1, DoubleValue value2)
           
static boolean ne(DoubleValue value1, DoubleValue value2)
           
static DoubleValue negative(DoubleValue value)
           
static DoubleValue positive(DoubleValue value)
           
static DoubleValue pow(DoubleValue value1, DoubleValue value2)
           
 String printValue()
           
static DoubleValue product(DoubleValue[] values)
           
static LongValue quotient(DoubleValue number, DoubleValue divisor)
           
static DoubleValue rem(DoubleValue value1, DoubleValue value2)
           
static DoubleValue round(DoubleValue value)
           
static DoubleValue round(DoubleValue d, DoubleValue p)
          Deprecated. as contains errors. Doesn`t round to the appropriate scale. Leaves the trash in the end, e.g. 1.89700000000001
static DoubleValue round(DoubleValue value, int scale)
           
static DoubleValue round(DoubleValue value, int scale, int roundingMethod)
           
 void setFormat(String format)
          Deprecated. 
 void setValue(double value)
           
static DoubleValue small(DoubleValue[] values, int position)
           
static DoubleValue subtract(DoubleValue value1, DoubleValue value2)
           
static DoubleValue sum(DoubleValue[] values)
           
 
Methods inherited from class org.openl.meta.explanation.ExplanationNumberValue
getAppropriateValue, getChildren, getDisplayName, getMetaInfo, getName, getObject, getOneArgumentException, getTwoArgumentsException, getType, isLeaf, setFullName, setMetaInfo, setName, toString, validate, validate, validate
 
Methods inherited from class org.openl.meta.number.NumberValue
getFormula, getFunction, getValueType
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final DoubleValue ZERO

ONE

public static final DoubleValue ONE
Constructor Detail

DoubleValue

public DoubleValue(double value)

DoubleValue

public DoubleValue(double value,
                   String name)

DoubleValue

public DoubleValue(double value,
                   IMetaInfo metaInfo)

DoubleValue

public DoubleValue(DoubleValue lv1,
                   DoubleValue lv2,
                   double value,
                   Formulas operand)
Formula constructor


DoubleValue

@Deprecated
public DoubleValue()
Deprecated. double value shouldn`t be empty.


DoubleValue

@Deprecated
public DoubleValue(double value,
                              IMetaInfo metaInfo,
                              String format)
Deprecated. 


DoubleValue

public DoubleValue(String valueString)

DoubleValue

public DoubleValue(DoubleValue result,
                   NumberOperations function,
                   DoubleValue[] params)
Function constructor

Method Detail

eq

public static boolean eq(DoubleValue value1,
                         DoubleValue value2)

ge

public static boolean ge(DoubleValue value1,
                         DoubleValue value2)

gt

public static boolean gt(DoubleValue value1,
                         DoubleValue value2)

le

public static boolean le(DoubleValue value1,
                         DoubleValue value2)

lt

public static boolean lt(DoubleValue value1,
                         DoubleValue value2)

ne

public static boolean ne(DoubleValue value1,
                         DoubleValue value2)

avg

public static DoubleValue avg(DoubleValue[] values)

sum

public static DoubleValue sum(DoubleValue[] values)

median

public static DoubleValue median(DoubleValue[] values)

max

public static DoubleValue max(DoubleValue value1,
                              DoubleValue value2)

min

public static DoubleValue min(DoubleValue value1,
                              DoubleValue value2)

max

public static DoubleValue max(DoubleValue[] values)

min

public static DoubleValue min(DoubleValue[] values)

copy

public static DoubleValue copy(DoubleValue value,
                               String name)

rem

public static DoubleValue rem(DoubleValue value1,
                              DoubleValue value2)

add

public static DoubleValue add(DoubleValue value1,
                              DoubleValue value2)

multiply

public static DoubleValue multiply(DoubleValue value1,
                                   DoubleValue value2)

subtract

public static DoubleValue subtract(DoubleValue value1,
                                   DoubleValue value2)

divide

public static DoubleValue divide(DoubleValue value1,
                                 DoubleValue value2)

quotient

public static LongValue quotient(DoubleValue number,
                                 DoubleValue divisor)

product

public static DoubleValue product(DoubleValue[] values)

mod

public static DoubleValue mod(DoubleValue number,
                              DoubleValue divisor)

small

public static DoubleValue small(DoubleValue[] values,
                                int position)

big

public static DoubleValue big(DoubleValue[] values,
                              int position)

pow

public static DoubleValue pow(DoubleValue value1,
                              DoubleValue value2)

abs

public static DoubleValue abs(DoubleValue value)

negative

public static DoubleValue negative(DoubleValue value)

inc

public static DoubleValue inc(DoubleValue value)

positive

public static DoubleValue positive(DoubleValue value)

dec

public static DoubleValue dec(DoubleValue value)

autocast

public static DoubleValue autocast(byte x,
                                   DoubleValue y)

autocast

public static DoubleValue autocast(short x,
                                   DoubleValue y)

autocast

public static DoubleValue autocast(int x,
                                   DoubleValue y)

autocast

public static DoubleValue autocast(long x,
                                   DoubleValue y)

autocast

public static DoubleValue autocast(float x,
                                   DoubleValue y)

autocast

public static DoubleValue autocast(double x,
                                   DoubleValue y)

copy

public DoubleValue copy(String name)
Specified by:
copy in class ExplanationNumberValue<DoubleValue>

printValue

public String printValue()

getValue

public double getValue()

setValue

public void setValue(double value)

autocast

public static DoubleValue autocast(Double x,
                                   DoubleValue y)

autocast

public static BigDecimalValue autocast(DoubleValue x,
                                       BigDecimalValue y)

cast

public static byte cast(DoubleValue x,
                        byte y)

cast

public static short cast(DoubleValue x,
                         short y)

cast

public static char cast(DoubleValue x,
                        char y)

cast

public static int cast(DoubleValue x,
                       int y)

cast

public static long cast(DoubleValue x,
                        long y)

cast

public static float cast(DoubleValue x,
                         float y)

cast

public static double cast(DoubleValue x,
                          double y)

cast

public static Double cast(DoubleValue x,
                          Double y)

cast

public static ByteValue cast(DoubleValue x,
                             ByteValue y)

cast

public static ShortValue cast(DoubleValue x,
                              ShortValue y)

cast

public static IntValue cast(DoubleValue x,
                            IntValue y)

cast

public static LongValue cast(DoubleValue x,
                             LongValue y)

cast

public static FloatValue cast(DoubleValue x,
                              FloatValue y)

round

public static DoubleValue round(DoubleValue value)

round

public static DoubleValue round(DoubleValue value,
                                int scale)

round

public static DoubleValue round(DoubleValue value,
                                int scale,
                                int roundingMethod)

round

@Deprecated
public static DoubleValue round(DoubleValue d,
                                           DoubleValue p)
Deprecated. as contains errors. Doesn`t round to the appropriate scale. Leaves the trash in the end, e.g. 1.89700000000001


compareTo

public int compareTo(Number o)

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

getFormat

@Deprecated
public String getFormat()
Deprecated. 


setFormat

@Deprecated
public void setFormat(String format)
Deprecated. 


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.