- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {FileOutputStream f =
File file;new FileOutputStream(file)
String name;new FileOutputStream(name)
File file;new FileOutputStream(file, true)
- Smart code suggestions by Codota
}
public static Number roundFloor(final Number n) { final Type t = Type.get(n.getClass()); if (t == null) { final String msg = format("Unexpected number type %s passed to roundDown method.", n.getClass().getCanonicalName()); _logger.warning(msg); throw new IllegalArgumentException(msg); } if (t.isIntegerOnly()) return n; if (Type.BIG_DECIMAL.equals(t)) { final BigDecimal d = (BigDecimal) n; final BigDecimal[] dandr = d.divideAndRemainder(BigDecimal.ONE); if (dandr[1].equals(BigDecimal.ZERO) || d.signum() == 1) return shrinkBigInteger(dandr[0].toBigIntegerExact()); else return shrinkBigInteger(dandr[0].toBigIntegerExact().subtract(BigInteger.ONE)); } else if (Type.RATIONAL.equals(t)) { final Rational r = (Rational) n; return roundFloor(r.getQuotient()); } else throw new IllegalStateException(); }
public static Number roundFloor(final Number n) { final Type t = Type.get(n.getClass()); if (t == null) { final String msg = format("Unexpected number type %s passed to roundDown method.", n.getClass().getCanonicalName()); _logger.warning(msg); throw new IllegalArgumentException(msg); } if (t.isIntegerOnly()) return n; if (Type.BIG_DECIMAL.equals(t)) { final BigDecimal d = (BigDecimal) n; final BigDecimal[] dandr = d.divideAndRemainder(BigDecimal.ONE); if (dandr[1].equals(BigDecimal.ZERO) || d.signum() == 1) return shrinkBigInteger(dandr[0].toBigIntegerExact()); else return shrinkBigInteger(dandr[0].toBigIntegerExact().subtract(BigInteger.ONE)); } else if (Type.RATIONAL.equals(t)) { final Rational r = (Rational) n; return roundFloor(r.getQuotient()); } else throw new IllegalStateException(); }
upper = OWLRealUtils.roundFloor(cu);
upper = OWLRealUtils.roundFloor(cu);