public static PrecisionContextRoundedOperator of ( MathContext mathContext ) { Objects . requireNonNull ( mathContext ) ; if ( RoundingMode . UNNECESSARY . equals ( mathContext . getRoundingMode ( ) ) ) { throw new IllegalArgumentException ( "To create the MathContextRoundedOperator you cannot use the RoundingMode.UNNECESSARY on MathContext" ) ; } if ( mathContext . getPrecision ( ) <= 0 ) { throw new IllegalArgumentException ( "To create the MathContextRoundedOperator you cannot use the zero precision on MathContext" ) ; } return new PrecisionContextRoundedOperator ( mathContext ) ; }
Creates the rounded Operator from mathContext