@Test(expectedExceptions = {UnsupportedOperationException.class}) public void testIncorrectNot() { BtrpNumber i = new BtrpNumber(2.5); i.not(); }
@Override public BtrpNumber not() { if (TRUE.equals(this)) { return FALSE; } else if (FALSE.equals(this)) { return TRUE; } throw new UnsupportedOperationException("Cannot negate a non-boolean"); }
BtrpNumber extends DefaultBtrpOperand { @Override public BtrpNumber not() { if (TRUE.equals(this)) { return FALSE; } else if (FALSE.equals(this)) { return TRUE; } throw new UnsupportedOperationException("Cannot negate a non-boolean"); } }
BtrpNumber extends DefaultBtrpOperand { @Override public BtrpNumber not() { if (TRUE.equals(this)) { return FALSE; } else if (FALSE.equals(this)) { return TRUE; } throw new UnsupportedOperationException("Cannot negate a non-boolean"); } BtrpNumber(int v, Base b);  BtrpNumber(double d); }
BtrpNumber extends DefaultBtrpOperand { @Override public BtrpNumber not() { if (TRUE.equals(this)) { return FALSE; } else if (FALSE.equals(this)) { return TRUE; } throw new UnsupportedOperationException("Cannot negate a non-boolean"); } BtrpNumber(int v, Base b);  BtrpNumber(double d); @Override Type type(); Base getBase(); @Override BtrpNumber power(BtrpOperand nb); @Override BtrpNumber plus(BtrpOperand other); @Override BtrpNumber minus(BtrpOperand other); @Override BtrpNumber negate(); @Override BtrpNumber times(BtrpOperand other); @Override BtrpNumber div(BtrpOperand other); @Override BtrpNumber remainder(BtrpOperand other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int degree(); int getIntValue(); double getDoubleValue(); @Override BtrpNumber eq(BtrpOperand other); @Override BtrpNumber geq(BtrpOperand other); @Override BtrpNumber gt(BtrpOperand other); @Override BtrpNumber not(); @Override BtrpNumber copy(); boolean isInteger(); }
BtrpNumber extends DefaultBtrpOperand { @Override public BtrpNumber not() { if (TRUE.equals(this)) { return FALSE; } else if (FALSE.equals(this)) { return TRUE; } throw new UnsupportedOperationException("Cannot negate a non-boolean"); } BtrpNumber(int v, Base b);  BtrpNumber(double d); @Override Type type(); Base getBase(); @Override BtrpNumber power(BtrpOperand nb); @Override BtrpNumber plus(BtrpOperand other); @Override BtrpNumber minus(BtrpOperand other); @Override BtrpNumber negate(); @Override BtrpNumber times(BtrpOperand other); @Override BtrpNumber div(BtrpOperand other); @Override BtrpNumber remainder(BtrpOperand other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int degree(); int getIntValue(); double getDoubleValue(); @Override BtrpNumber eq(BtrpOperand other); @Override BtrpNumber geq(BtrpOperand other); @Override BtrpNumber gt(BtrpOperand other); @Override BtrpNumber not(); @Override BtrpNumber copy(); boolean isInteger(); static final BtrpNumber TRUE; static final BtrpNumber FALSE; }