code: public boolean matches(Attribute<?> other) {
        if (other == null)
           return false;
        if (!this.definition.equals(other.definition))
           return false;
        if (this.definition.isGlobal()) {
           if (Matchable.class.isAssignableFrom(this.definition.getType())) {
              return ((Matchable)value).matches(other.value);
           } else {
              return Objects.equals(value, other.value);
           }
        }
        return true;
     }
docs: Compares this attribute to another attribute taking into account the {@link AttributeDefinition#isGlobal()} flag.
  If the attribute is global, then this method will return true only if the values are identical.
  If the attribute is local, then this method will return true even if the values don't match.
  Essentially, this method only ensures that the attribute definitions are equals.
  @param other
  @return