public abstract class UntypedNumber extends Number implements Comparable, Serializable
This is an extension of Java's Number class that provides methods for performing untyped polymorphic arithmetic. For example, an UntypedDouble can be added to an UntypedInteger without having to know the class of each operand.
Constructor and Description |
---|
UntypedNumber() |
Modifier and Type | Method and Description |
---|---|
abstract UntypedNumber |
add(UntypedNumber other) |
abstract UntypedNumber |
divide(UntypedNumber other) |
abstract UntypedNumber |
multiply(UntypedNumber other) |
abstract UntypedNumber |
subtract(UntypedNumber other) |
byteValue, doubleValue, floatValue, intValue, longValue, shortValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo
public abstract UntypedNumber multiply(UntypedNumber other)
public abstract UntypedNumber add(UntypedNumber other)
public abstract UntypedNumber subtract(UntypedNumber other)
public abstract UntypedNumber divide(UntypedNumber other)
Copyright © 2014. All rights reserved.