org.semanticweb.HermiT.datatypes.owlreal
Class Numbers
java.lang.Object
org.semanticweb.HermiT.datatypes.owlreal.Numbers
public class Numbers
- extends 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(Number n)
parseInteger
public static Number parseInteger(String string)
throws 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:
NumberFormatException
parseDecimal
public static Number parseDecimal(String string)
throws 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:
NumberFormatException
parseRational
public static Number parseRational(String string)
throws 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:
NumberFormatException
compare
public static int compare(Number n1,
Number n2)
getNumberType
protected static int getNumberType(Number n)
toBigInteger
protected static BigInteger toBigInteger(Number n,
int nType)
toBigDecimal
protected static BigDecimal toBigDecimal(Number n,
int nType)
toBigRational
protected static BigRational toBigRational(Number n,
int nType)
getNearestIntegerInBound
public static Number getNearestIntegerInBound(Number bound,
Numbers.BoundaryDirection boundaryDirection,
boolean boundIsInclusive)
subtractIntegerIntervalSizeFrom
public static int subtractIntegerIntervalSizeFrom(Number lowerBoundInclusive,
Number upperBoundInclusive,
int argument)
nextInteger
public static Number nextInteger(Number integer)
Copyright © 2012. All Rights Reserved.