@Override
public int compareTo(@Nonnull EncodedValue o) {
int res = Ints.compare(getValueType(), o.getValueType());
if (res != 0) return res;
AnnotationEncodedValue other = (AnnotationEncodedValue)o;
res = getType().compareTo(other.getType());
if (res != 0) return res;
return CollectionUtils.compareAsSet(getElements(), other.getElements());
}