public interface AnnotationComparator<T extends Annotation>
QualifierEqualityFactory
generator to create comparators for
testing the equality of qualifiers at runtime.
NOTE: This interface is only for tested the attribute-equality of like-typed annotations. For instance, you can only compare an annotation of type Foo with another annotation of type Foo. You cannot compare the equality of Foo with Bar. Attempting to do so will simply result in a ClassCastException.
Modifier and Type | Method and Description |
---|---|
int |
hashCodeOf(T a1)
Creates a consistent hashCode based on the attribute values of the annotation.
|
boolean |
isEqual(T a1,
T a2)
Tests the equality of two qualifiers.
|
boolean isEqual(T a1, T a2)
a1
- an annotation to be compared. cannot be null.a2
- an annotation to be compared. cannot be null.int hashCodeOf(T a1)
a1
- the annotation to have a hashCode generated for. cannot be null.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.