CEnumValue implements PEnumValue<CEnumValue>, CAnnotatedDescriptor { @Override public boolean equals(Object o) { if (o == this) return true; if (o == null || !(o instanceof CEnumValue)) { return false; } CEnumValue other = (CEnumValue) o; return other.descriptor() .getQualifiedName() .equals(type.getQualifiedName()) && other.asString() .equals(name) && other.asInteger() == value; } CEnumValue(@Nullable String comment,
                      int value,
                      @Nonnull String name,
                      @Nonnull PEnumDescriptor<CEnumValue> type,
                      @Nullable Map<String, String> annotations); @Override String getDocumentation(); @Override int asInteger(); @Nonnull @Override String asString(); @Nonnull @Override @SuppressWarnings("unchecked") Set<String> getAnnotations(); @Override boolean hasAnnotation(@Nonnull String name); @Override String getAnnotationValue(@Nonnull String name); @Nonnull @Override PEnumDescriptor<CEnumValue> descriptor(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(@Nonnull CEnumValue other); @Override String toString();  }
@Test public void testEquals() { assertTrue(value3.equals(value3_other)); assertFalse(value3.equals(value5)); assertFalse(value3.equals(type)); }