/** {@inheritDoc} */ public int compareTo(AnnotationSetRefList o) { int comp = annotationSets.length - o.annotationSets.length; if (comp != 0) { return comp; } for (int i=0; i<annotationSets.length; i++) { comp = annotationSets[i].compareTo(o.annotationSets[i]); if (comp != 0) { return comp; } } return comp; }
@Override public boolean equals(Object o) { if (this==o) { return true; } if (o==null || !this.getClass().equals(o.getClass())) { return false; } AnnotationSetItem other = (AnnotationSetItem)o; return (this.compareTo(other) == 0); } }
/** {@inheritDoc} */ public int compareTo(AnnotationDirectoryItem o) { if (!isInternable()) { if (!o.isInternable()) { return parent.compareTo(o.parent); } return -1; } if (!o.isInternable()) { return 1; } return classAnnotations.compareTo(o.classAnnotations); }
/** {@inheritDoc} */ public int compareTo(AnnotationSetRefList o) { int comp = annotationSets.length - o.annotationSets.length; if (comp != 0) { return comp; } for (int i=0; i<annotationSets.length; i++) { comp = annotationSets[i].compareTo(o.annotationSets[i]); if (comp != 0) { return comp; } } return comp; }
/** {@inheritDoc} */ public int compareTo(AnnotationDirectoryItem o) { Preconditions.checkNotNull(o); if (!isInternable()) { if (!o.isInternable()) { Preconditions.checkState(parent != null && o.parent != null, "Must call setParent before comparing AnnotationDirectoryItem instances"); return parent.compareTo(o.parent); } return -1; } if (!o.isInternable()) { return 1; } return classAnnotations.compareTo(o.classAnnotations); }
@Override public boolean equals(Object o) { if (this==o) { return true; } if (o==null || !this.getClass().equals(o.getClass())) { return false; } AnnotationSetItem other = (AnnotationSetItem)o; return (this.compareTo(other) == 0); } }