@Test public void testEquals() { Expression expression = new Expression("my.expression", "MYLANG"); Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer"); Attribute attribute2 = new Attribute(attribute); assertTrue(attribute.equals(attribute2)); attribute2.setRenderer("anotherRenderer"); assertFalse(attribute.equals(attribute2)); attribute2 = new Attribute(attribute); attribute2.setRole("otherrole"); assertFalse(attribute.equals(attribute2)); attribute2 = new Attribute(attribute); attribute2.setExpressionObject(new Expression("another.expression", "MYLANG")); assertFalse(attribute.equals(attribute2)); attribute2 = new Attribute(attribute); attribute2.setValue("anothervalue"); assertFalse(attribute.equals(attribute2)); }
@Override public boolean equals(Object obj) { Attribute attribute = (Attribute) obj; return nullSafeEquals(value, attribute.value) && nullSafeEquals(renderer, attribute.renderer) && nullSafeEquals(roles, attribute.roles) && nullSafeEquals(expressionObject, attribute.expressionObject); }
Attribute implements Serializable, Cloneable { @Override public boolean equals(Object obj) { Attribute attribute = (Attribute) obj; return nullSafeEquals(value, attribute.value) && nullSafeEquals(renderer, attribute.renderer) && nullSafeEquals(roles, attribute.roles) && nullSafeEquals(expressionObject, attribute.expressionObject); } }
Attribute implements Serializable, Cloneable { @Override public boolean equals(Object obj) { Attribute attribute = (Attribute) obj; return nullSafeEquals(value, attribute.value) && nullSafeEquals(renderer, attribute.renderer) && nullSafeEquals(roles, attribute.roles) && nullSafeEquals(expressionObject, attribute.expressionObject); } Attribute();  Attribute(Object value);  Attribute(Attribute attribute);  Attribute(Object value, String role);  Attribute(Object value, Expression expression, String role, String rendererName); }
Attribute implements Serializable, Cloneable { @Override public boolean equals(Object obj) { Attribute attribute = (Attribute) obj; return nullSafeEquals(value, attribute.value) && nullSafeEquals(renderer, attribute.renderer) && nullSafeEquals(roles, attribute.roles) && nullSafeEquals(expressionObject, attribute.expressionObject); } Attribute();  Attribute(Object value);  Attribute(Attribute attribute);  Attribute(Object value, String role);  Attribute(Object value, Expression expression, String role, String rendererName); static Attribute createTemplateAttribute(String template); static Attribute createTemplateAttribute(String template,
            String templateExpression, String templateType, String role); static Attribute createTemplateAttributeWithExpression(
            String templateExpression); String getRole(); Set<String> getRoles(); void setRole(String role); void setRoles(Set<String> roles); Object getValue(); void setValue(Object value); Expression getExpressionObject(); void setExpressionObject(Expression expressionObject); @Override String toString(); String getRenderer(); void setRenderer(String rendererName); void inherit(Attribute attribute); @Override boolean equals(Object obj); boolean isPermitted(Request request); @Override int hashCode(); @Override Attribute clone(); }
Attribute implements Serializable, Cloneable { @Override public boolean equals(Object obj) { Attribute attribute = (Attribute) obj; return nullSafeEquals(value, attribute.value) && nullSafeEquals(renderer, attribute.renderer) && nullSafeEquals(roles, attribute.roles) && nullSafeEquals(expressionObject, attribute.expressionObject); } Attribute();  Attribute(Object value);  Attribute(Attribute attribute);  Attribute(Object value, String role);  Attribute(Object value, Expression expression, String role, String rendererName); static Attribute createTemplateAttribute(String template); static Attribute createTemplateAttribute(String template,
            String templateExpression, String templateType, String role); static Attribute createTemplateAttributeWithExpression(
            String templateExpression); String getRole(); Set<String> getRoles(); void setRole(String role); void setRoles(Set<String> roles); Object getValue(); void setValue(Object value); Expression getExpressionObject(); void setExpressionObject(Expression expressionObject); @Override String toString(); String getRenderer(); void setRenderer(String rendererName); void inherit(Attribute attribute); @Override boolean equals(Object obj); boolean isPermitted(Request request); @Override int hashCode(); @Override Attribute clone();  }