@Test public void testArrayValueEqualsDifferentTypes() { ArrayImpl a1 = new ArrayImpl(new Object[] {1, 2, 3}); ArrayImpl a2 = new ArrayImpl(new Object[] {"1", 2}); assertFalse(a1.equals(a2)); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Array)) { return false; } Array other = (Array) obj; return EquivalenceUtil.areEqual(type, other.type) && EquivalenceUtil.areEqual(expressions, other.expressions); }
Array implements Expression { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Array)) { return false; } Array other = (Array) obj; return EquivalenceUtil.areEqual(type, other.type) && EquivalenceUtil.areEqual(expressions, other.expressions); } }
Array implements Expression { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Array)) { return false; } Array other = (Array) obj; return EquivalenceUtil.areEqual(type, other.type) && EquivalenceUtil.areEqual(expressions, other.expressions); } Array(List<Expression> expressions);  Array(Class<?> baseType, List<Expression> expresssions); }
Array implements Expression { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Array)) { return false; } Array other = (Array) obj; return EquivalenceUtil.areEqual(type, other.type) && EquivalenceUtil.areEqual(expressions, other.expressions); } Array(List<Expression> expressions);  Array(Class<?> baseType, List<Expression> expresssions); @Override Class<?> getType(); void setType(Class<?> type); @Override void acceptVisitor(LanguageVisitor visitor); @Override Array clone(); Class<?> getComponentType(); void setComponentType(Class<?> baseType); List<Expression> getExpressions(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); void setImplicit(boolean implicit); boolean isImplicit(); }
Array implements Expression { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Array)) { return false; } Array other = (Array) obj; return EquivalenceUtil.areEqual(type, other.type) && EquivalenceUtil.areEqual(expressions, other.expressions); } Array(List<Expression> expressions);  Array(Class<?> baseType, List<Expression> expresssions); @Override Class<?> getType(); void setType(Class<?> type); @Override void acceptVisitor(LanguageVisitor visitor); @Override Array clone(); Class<?> getComponentType(); void setComponentType(Class<?> baseType); List<Expression> getExpressions(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); void setImplicit(boolean implicit); boolean isImplicit();  }