DimensionsDescriptor implements Serializable, Comparable<DimensionsDescriptor> { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final DimensionsDescriptor other = (DimensionsDescriptor)obj; if (!this.customTimeBucket.equals(other.customTimeBucket)) { return false; } if (this.fields != other.fields && (this.fields == null || !this.fields.equals(other.fields))) { return false; } return true; } private  DimensionsDescriptor(); @Deprecated  DimensionsDescriptor(TimeBucket timeBucket, Fields fields);  DimensionsDescriptor(CustomTimeBucket timeBucket, Fields fields);  DimensionsDescriptor(Fields fields);  DimensionsDescriptor(String aggregationString); @Deprecated TimeBucket getTimeBucket(); CustomTimeBucket getCustomTimeBucket(); Fields getFields(); FieldsDescriptor createFieldsDescriptor(FieldsDescriptor parentDescriptor); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override int compareTo(DimensionsDescriptor other); static final String DIMENSION_TIME; static final Type DIMENSION_TIME_TYPE; static final String DIMENSION_TIME_BUCKET; static final Type DIMENSION_TIME_BUCKET_TYPE; static final Fields TIME_FIELDS; static final Set<String> RESERVED_DIMENSION_NAMES; static final String DELIMETER_EQUALS; static final String DELIMETER_SEPERATOR; static final Map<String, Type> DIMENSION_FIELD_TO_TYPE; }
@Test public void equalsAndHashCodeTest() { DimensionsDescriptor ddA = new DimensionsDescriptor(new CustomTimeBucket(TimeBucket.MINUTE, 5L), new Fields(Sets.newHashSet("a", "b"))); DimensionsDescriptor ddB = new DimensionsDescriptor(new CustomTimeBucket(TimeBucket.MINUTE, 5L), new Fields(Sets.newHashSet("a", "b"))); Assert.assertTrue(ddB.equals(ddA)); }