Represents an unequality expression of the form " e1 != e2 " where e1 and e2 are the operand expressions . @author David J. Pearce
| 3484 | * |
| 3485 | */ |
| 3486 | public static class NotEqual extends AbstractItem implements BinaryOperator { |
| 3487 | public NotEqual(Expr lhs, Expr rhs) { |
| 3488 | super(EXPR_notequal, lhs, rhs); |
| 3489 | } |
| 3490 | |
| 3491 | @Override |
| 3492 | public Type getType() { |
| 3493 | return Type.Bool; |
| 3494 | } |
| 3495 | |
| 3496 | @Override |
| 3497 | public void setType(Type type) { |
| 3498 | if(!type.equals(Type.Bool)) { |
| 3499 | throw new IllegalArgumentException(); |
| 3500 | } |
| 3501 | } |
| 3502 | |
| 3503 | @Override |
| 3504 | public Expr getFirstOperand() { |
| 3505 | return (Expr) super.get(0); |
| 3506 | } |
| 3507 | |
| 3508 | @Override |
| 3509 | public Expr getSecondOperand() { |
| 3510 | return (Expr) super.get(1); |
| 3511 | } |
| 3512 | |
| 3513 | @Override |
| 3514 | public Expr clone(Syntactic.Item[] operands) { |
| 3515 | return new NotEqual((Expr) operands[0], (Expr) operands[1]); |
| 3516 | } |
| 3517 | |
| 3518 | @Override |
| 3519 | public String toString() { |
| 3520 | return " != "; |
| 3521 | } |
| 3522 | |
| 3523 | public static final Descriptor DESCRIPTOR_0 = new Descriptor(Operands.TWO, Data.ZERO, "EXPR_notequal") { |
| 3524 | @Override |
| 3525 | public Syntactic.Item construct(int opcode, Syntactic.Item[] operands, byte[] data) { |
| 3526 | return new NotEqual((Expr) operands[0], (Expr) operands[1]); |
| 3527 | } |
| 3528 | }; |
| 3529 | } |
| 3530 | |
| 3531 | /** |
| 3532 | * Represents a strict <i>inequality expression</i> of the form |
nothing calls this directly
no outgoing calls
no test coverage detected