@Test public void equals() throws Exception { assertThat(emptyStack().push(simple1)).isEqualTo(emptyStack().push(simple1)); assertThat(emptyStack().push(simple1)).isNotEqualTo(emptyStack().push(simple2)); assertThat(emptyStack().push(simple1)).isNotEqualTo(""); }
@Override public boolean equals(Object obj) { if (obj instanceof ExpressionStack) { ExpressionStack other = (ExpressionStack) obj; return Objects.equals(this.stack, other.stack); } return false; }
ExpressionStack { @Override public boolean equals(Object obj) { if (obj instanceof ExpressionStack) { ExpressionStack other = (ExpressionStack) obj; return Objects.equals(this.stack, other.stack); } return false; } }
ExpressionStack { @Override public boolean equals(Object obj) { if (obj instanceof ExpressionStack) { ExpressionStack other = (ExpressionStack) obj; return Objects.equals(this.stack, other.stack); } return false; } private  ExpressionStack(); private  ExpressionStack(Deque<SymbolicValue> stack); }
ExpressionStack { @Override public boolean equals(Object obj) { if (obj instanceof ExpressionStack) { ExpressionStack other = (ExpressionStack) obj; return Objects.equals(this.stack, other.stack); } return false; } private  ExpressionStack(); private  ExpressionStack(Deque<SymbolicValue> stack); static ExpressionStack emptyStack(); ExpressionStack push(SymbolicValue newValue); ExpressionStack execute(ExpressionTree expression, ProgramStateConstraints constraints); SymbolicValue peek(); int size(); boolean isEmpty(); @Override int hashCode(); @Override boolean equals(Object obj); SymbolicValue peek(int n); ExpressionStack removeLastValue(); ExpressionStack apply(Consumer<Deque<SymbolicValue>> action); @Override String toString(); }
ExpressionStack { @Override public boolean equals(Object obj) { if (obj instanceof ExpressionStack) { ExpressionStack other = (ExpressionStack) obj; return Objects.equals(this.stack, other.stack); } return false; } private  ExpressionStack(); private  ExpressionStack(Deque<SymbolicValue> stack); static ExpressionStack emptyStack(); ExpressionStack push(SymbolicValue newValue); ExpressionStack execute(ExpressionTree expression, ProgramStateConstraints constraints); SymbolicValue peek(); int size(); boolean isEmpty(); @Override int hashCode(); @Override boolean equals(Object obj); SymbolicValue peek(int n); ExpressionStack removeLastValue(); ExpressionStack apply(Consumer<Deque<SymbolicValue>> action); @Override String toString();  }