C# 클래스 VoltDB.Data.Client.VoltDecimal

Define the Volt-specific decimal(38,12) structure over the standard Java-like implementation of BigDecimal. Full operator support provided. Some methods removed, consistent with the fixed-sclae behavior.
All conversion and mathematical operations maintain the fixed scale at 12 digits -> some operations might lose precision or throw overflow exceptions.
파일 보기 프로젝트 열기: VoltDB/voltdb-client-csharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MaxValue VoltDB.ThirdParty.Math.BigDecimal
MinValue VoltDB.ThirdParty.Math.BigDecimal
NullValue VoltDB.ThirdParty.Math.BigDecimal

공개 메소드들

메소드 설명
Equals ( object o ) : bool

Overrides Equals operator

GetHashCode ( ) : int

Returns a hashcode for the current instance.

IsVoltDBNull ( ) : bool

Returns whether the variable corresponds to a null VoltDB value.

MovePointLeft ( int n ) : VoltDecimal

Moves the decimal point to the left (essentially: divide by 10^n)

MovePointRight ( int n ) : VoltDecimal

Moves the decimal point to the left (essentially: multiply by 10^n)

ToBytes ( ) : byte[]

Returns the bytes for thie BigDecimal instance, for serialization.

ToString ( ) : string

Override ToString operator to provide a string representation of the number.

VoltDecimal ( BigDecimal num ) : System

Creates a new decimal from a generic BigDecimal value.

VoltDecimal ( BigInteger num ) : System

Creates a new decimal from a BigInteger value.

VoltDecimal ( BigInteger num, int scale ) : System

Creates a new decimal from a BigInteger value and optional scale (will be redefined to FixedScale after original initialization).

VoltDecimal ( byte data ) : System

Creates a new instance of the BigDecimal data type, from the deserialization data.

VoltDecimal ( decimal num ) : System

Creates a new decimal from a decimal value.

VoltDecimal ( double num ) : System

Creates a new decimal from a double value.

VoltDecimal ( long num ) : System

Creates a new decimal from a long value.

VoltDecimal ( string num ) : System

Creates a new decimal from a string value.

VoltDecimal ( ulong num ) : System

Creates a new decimal from a ulong value.

operator ( ) : VoltDecimal

Operator definition: binary *

operator ( ) : bool

Operator definition: binary !=

비공개 메소드들

메소드 설명
IsValidValue ( BigDecimal value ) : bool

Returns whether a given BigDecimal value fits within the restrictions of the VoltDecimal type.

ValidOrThrow ( BigDecimal value ) : void

Checks a value and, in case of validation failure throws an exception.

메소드 상세

Equals() 공개 메소드

Overrides Equals operator
public Equals ( object o ) : bool
o object Object to compare this instance with.
리턴 bool

GetHashCode() 공개 메소드

Returns a hashcode for the current instance.
public GetHashCode ( ) : int
리턴 int

IsVoltDBNull() 공개 메소드

Returns whether the variable corresponds to a null VoltDB value.
public IsVoltDBNull ( ) : bool
리턴 bool

MovePointLeft() 공개 메소드

Moves the decimal point to the left (essentially: divide by 10^n)
public MovePointLeft ( int n ) : VoltDecimal
n int Number of digits to shift by.
리턴 VoltDecimal

MovePointRight() 공개 메소드

Moves the decimal point to the left (essentially: multiply by 10^n)
public MovePointRight ( int n ) : VoltDecimal
n int Number of digits to shift by.
리턴 VoltDecimal

ToBytes() 공개 메소드

Returns the bytes for thie BigDecimal instance, for serialization.
public ToBytes ( ) : byte[]
리턴 byte[]

ToString() 공개 메소드

Override ToString operator to provide a string representation of the number.
public ToString ( ) : string
리턴 string

VoltDecimal() 공개 메소드

Creates a new decimal from a generic BigDecimal value.
public VoltDecimal ( BigDecimal num ) : System
num VoltDB.ThirdParty.Math.BigDecimal Value used for initialization.
리턴 System

VoltDecimal() 공개 메소드

Creates a new decimal from a BigInteger value.
public VoltDecimal ( BigInteger num ) : System
num VoltDB.ThirdParty.Math.BigInteger Value used for initialization.
리턴 System

VoltDecimal() 공개 메소드

Creates a new decimal from a BigInteger value and optional scale (will be redefined to FixedScale after original initialization).
public VoltDecimal ( BigInteger num, int scale ) : System
num VoltDB.ThirdParty.Math.BigInteger Value used for initialization.
scale int Scale of the decimal value to create.
리턴 System

VoltDecimal() 공개 메소드

Creates a new instance of the BigDecimal data type, from the deserialization data.
public VoltDecimal ( byte data ) : System
data byte Binary data as provided by the server's response.
리턴 System

VoltDecimal() 공개 메소드

Creates a new decimal from a decimal value.
public VoltDecimal ( decimal num ) : System
num decimal Value used for initialization.
리턴 System

VoltDecimal() 공개 메소드

Creates a new decimal from a double value.
public VoltDecimal ( double num ) : System
num double Value used for initialization.
리턴 System

VoltDecimal() 공개 메소드

Creates a new decimal from a long value.
public VoltDecimal ( long num ) : System
num long Value used for initialization.
리턴 System

VoltDecimal() 공개 메소드

Creates a new decimal from a string value.
public VoltDecimal ( string num ) : System
num string Value used for initialization.
리턴 System

VoltDecimal() 공개 메소드

Creates a new decimal from a ulong value.
public VoltDecimal ( ulong num ) : System
num ulong Value used for initialization.
리턴 System

operator() 공개 정적인 메소드

Operator definition: binary *
public static operator ( ) : VoltDecimal
리턴 VoltDecimal

operator() 공개 정적인 메소드

Operator definition: binary !=
public static operator ( ) : bool
리턴 bool

프로퍼티 상세

MaxValue 공개적으로 정적으로 프로퍼티

MaxValue definition
public static BigDecimal,VoltDB.ThirdParty.Math MaxValue
리턴 VoltDB.ThirdParty.Math.BigDecimal

MinValue 공개적으로 정적으로 프로퍼티

MinValue definition
public static BigDecimal,VoltDB.ThirdParty.Math MinValue
리턴 VoltDB.ThirdParty.Math.BigDecimal

NullValue 공개적으로 정적으로 프로퍼티

NullValue definition
public static BigDecimal,VoltDB.ThirdParty.Math NullValue
리턴 VoltDB.ThirdParty.Math.BigDecimal