Class MappingOperationChain.SpecialNumeral
java.lang.Object
me.datafox.dfxengine.values.operation.MappingOperationChain.SpecialNumeral
- All Implemented Interfaces:
Comparable<Numeral>,Numeral
- Enclosing class:
MappingOperationChain
A special
MappingOperationChain-specific extension of Numeral that is used to refer to the source
numeral and the result numerals of Operations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis implementation always returnsBigDecimal.ZERO.This implementation always returnsBigInteger.ZERO.booleancanConvert(NumeralType type) This implementation always returnsfalse.intCompares this numeral with the specified numeral for order.convert(NumeralType type) This implementation always returns itself.convertIfAllowed(NumeralType type) This implementation always returns itself.doubleThis implementation always returns0d.floatThis implementation always returns0f.intgetId()This implementation always returns theInteger0.getType()This implementation always returnsNumeralType.INT.intintValue()This implementation always returns0.longThis implementation always returns0L.This implementation always returns itself.This implementation always returns itself.This implementation always returns itself.toString()
-
Constructor Details
-
Method Details
-
getId
public int getId() -
getNumber
This implementation always returns theInteger0. -
getType
This implementation always returnsNumeralType.INT. -
canConvert
This implementation always returnsfalse.- Specified by:
canConvertin interfaceNumeral- Parameters:
type- ignored parameter- Returns:
false
-
convert
This implementation always returns itself. -
convertIfAllowed
This implementation always returns itself.- Specified by:
convertIfAllowedin interfaceNumeral- Parameters:
type- ignored parameter- Returns:
- this numeral
-
toInteger
This implementation always returns itself. -
toDecimal
This implementation always returns itself. -
toSmallestType
This implementation always returns itself.- Specified by:
toSmallestTypein interfaceNumeral- Returns:
- this numeral
-
intValue
public int intValue()This implementation always returns0. -
longValue
public long longValue()This implementation always returns0L. -
bigIntValue
This implementation always returnsBigInteger.ZERO.- Specified by:
bigIntValuein interfaceNumeral- Returns:
- the value of this numeral as a
BigInteger
-
floatValue
public float floatValue()This implementation always returns0f.- Specified by:
floatValuein interfaceNumeral- Returns:
- the value of this numeral as a
float
-
doubleValue
public double doubleValue()This implementation always returns0d.- Specified by:
doubleValuein interfaceNumeral- Returns:
- the value of this numeral as a
double
-
bigDecValue
This implementation always returnsBigDecimal.ZERO.- Specified by:
bigDecValuein interfaceNumeral- Returns:
- the value of this numeral as a
BigDecimal
-
compareTo
Compares this numeral with the specified numeral for order. If the other numeral is also a SpecialNumeral, they are compared withInteger.compare(int, int)usinggetId(). Otherwise, 1 is returned.- Specified by:
compareToin interfaceComparable<Numeral>- Parameters:
other- numeral to be compared- Returns:
- a negative integer, zero, or a positive integer as this numeral is less than, equal to, or greater than the specified numeral
-
toString
-