private boolean checkOverflowForRational( Rational[] value ) { for( Rational v : value ) { if( v.getNumerator() < LONG_MIN || v.getDenominator() < LONG_MIN || v.getNumerator() > LONG_MAX || v.getDenominator() > LONG_MAX ) { return true; } } return false; }
private boolean checkOverflowForUnsignedRational( Rational[] value ) { for( Rational v : value ) { if( v.getNumerator() < 0 || v.getDenominator() < 0 || v.getNumerator() > UNSIGNED_LONG_MAX || v.getDenominator() > UNSIGNED_LONG_MAX ) { return true; } } return false; }
private boolean checkOverflowForRational( Rational[] value ) { for( Rational v : value ) { if( v.getNumerator() < LONG_MIN || v.getDenominator() < LONG_MIN || v.getNumerator() > LONG_MAX || v.getDenominator() > LONG_MAX ) { return true; } } return false; }
private boolean checkOverflowForUnsignedRational( Rational[] value ) { for( Rational v : value ) { if( v.getNumerator() < 0 || v.getDenominator() < 0 || v.getNumerator() > UNSIGNED_LONG_MAX || v.getDenominator() > UNSIGNED_LONG_MAX ) { return true; } } return false; }
public OrderedDataOutputStream writeRational( Rational rational ) throws IOException { writeInt( (int) rational.getNumerator() ); writeInt( (int) rational.getDenominator() ); return this; }
public OrderedDataOutputStream writeRational( Rational rational ) throws IOException { writeInt( (int) rational.getNumerator() ); writeInt( (int) rational.getDenominator() ); return this; }