if (category.equals(attribute.getCategory()))
if (!category.equals(attribute.getCategory()))
  public static void verifyCategoryForValue(Class category,                                            Attribute attribute)  {    if (category == null)      throw new NullPointerException("object may not be null");    if (category.equals(attribute.getCategory()))      throw new IllegalArgumentException        ("category of attribute not equal to category");  }