Module com.cryptoalgo.oursql.oursql
Class IntNumberContainer
java.lang.Object
com.cryptoalgo.oursql.model.db.data.Container<T>
com.cryptoalgo.oursql.model.db.data.NumberContainer<Integer>
com.cryptoalgo.oursql.model.db.data.IntNumberContainer
A container for int-based SQL types
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionIntNumberContainer(String boxValue) Create an instance of this container with a string to decode and unbox. -
Method Summary
Modifier and TypeMethodDescriptionprotected BigDecimalGet theBigDecimalrepresentation of a value of the container's boxed typeprotected BigDecimalgetMax()Get the maximum allowable value that can be represented by this numerical typeprotected BigDecimalgetMin()Get the minimum allowable value that can be represented by this numerical typebooleantoString()"Unbox" a raw string to the boxed typeMethods inherited from class com.cryptoalgo.oursql.model.db.data.NumberContainer
getFinalValueMethods inherited from class com.cryptoalgo.oursql.model.db.data.Container
getInstance, getTypes, getValue, isEditable, toSQLString
-
Constructor Details
-
IntNumberContainer
Create an instance of this container with a string to decode and unbox. Construction will fail if the provided raw string cannot be parsed as an int.- Parameters:
boxValue- Raw string to decode and unbox into this container
-
-
Method Details
-
unbox
Description copied from class:Container"Unbox" a raw string to the boxed type -
getMin
Description copied from class:NumberContainerGet the minimum allowable value that can be represented by this numerical type- Specified by:
getMinin classNumberContainer<Integer>- Returns:
- Minimum value that can be represented by this numerical type
-
getMax
Description copied from class:NumberContainerGet the maximum allowable value that can be represented by this numerical type- Specified by:
getMaxin classNumberContainer<Integer>- Returns:
- Maximum value that can be represented by this numerical type
-
getBigDecimalValue
Description copied from class:NumberContainerGet theBigDecimalrepresentation of a value of the container's boxed type- Specified by:
getBigDecimalValuein classNumberContainer<Integer>- Parameters:
val- A value- Returns:
- The
BigDecimalrepresentation of the value
-
isValid
- Overrides:
isValidin classNumberContainer<Integer>- Parameters:
value- Value to be checked- Returns:
- true if
valuecan be cast to the type of this container
-
toString
- Specified by:
toStringin classNumberContainer<Integer>
-