org.semanticweb.HermiT.datatypes.owlreal
Class Numbers
java.lang.Object
org.semanticweb.HermiT.datatypes.owlreal.Numbers
public class Numbers
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Numbers
public Numbers()
isValidNumber
public static boolean isValidNumber(java.lang.Number n)
parseInteger
public static java.lang.Number parseInteger(java.lang.String string)
throws java.lang.NumberFormatException
- Parses the given string into a Java Number object representing an integer.
The Java object is chosen such that .equals() works correctly across all Number-derived objects.
- Throws:
java.lang.NumberFormatException
parseDecimal
public static java.lang.Number parseDecimal(java.lang.String string)
throws java.lang.NumberFormatException
- Parses the given string into a Java Number object representing an decimal.
The Java object is chosen such that .equals() works correctly across all Number-derived objects.
- Throws:
java.lang.NumberFormatException
parseRational
public static java.lang.Number parseRational(java.lang.String string)
throws java.lang.NumberFormatException
- Parses the given string into a Java Number object representing a rational.
The Java object is chosen such that .equals() works correctly across all Number-derived objects.
- Throws:
java.lang.NumberFormatException
compare
public static int compare(java.lang.Number n1,
java.lang.Number n2)
toBigInteger
protected static java.math.BigInteger toBigInteger(java.lang.Number n,
Numbers.NumberType nType)
toBigDecimal
protected static java.math.BigDecimal toBigDecimal(java.lang.Number n,
Numbers.NumberType nType)
toBigRational
protected static BigRational toBigRational(java.lang.Number n,
Numbers.NumberType nType)
getNearestIntegerInBound
public static java.lang.Number getNearestIntegerInBound(java.lang.Number bound,
Numbers.BoundaryDirection boundaryDirection,
boolean boundIsInclusive)
subtractIntegerIntervalSizeFrom
public static int subtractIntegerIntervalSizeFrom(java.lang.Number lowerBoundInclusive,
java.lang.Number upperBoundInclusive,
int argument)
nextInteger
public static java.lang.Number nextInteger(java.lang.Number integer)