@Test public void equalsWithNonGranularityObjectReturnsFalse() { Assert.assertFalse(Granularity.FULL.equals(new Object())); Assert.assertFalse(Granularity.MIN_5.equals(new Object())); Assert.assertFalse(Granularity.MIN_20.equals(new Object())); Assert.assertFalse(Granularity.MIN_60.equals(new Object())); Assert.assertFalse(Granularity.MIN_240.equals(new Object())); Assert.assertFalse(Granularity.MIN_1440.equals(new Object())); }
@Override public boolean equals(Object obj) { if (!(obj instanceof Granularity)) return false; else return obj == this; }
Granularity { @Override public boolean equals(Object obj) { if (!(obj instanceof Granularity)) return false; else return obj == this; } }
Granularity { @Override public boolean equals(Object obj) { if (!(obj instanceof Granularity)) return false; else return obj == this; } private  Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { @Override public boolean equals(Object obj) { if (!(obj instanceof Granularity)) return false; else return obj == this; } private  Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Granularity finer(); boolean isCoarser(Granularity other); long snapMillis(long millis); int slot(long millis); int slotFromFinerSlot(int finerSlot); Range deriveRange(int slot, long referenceMillis); static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points); static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points, String algorithm, long assumedIntervalMillis); static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points, String algorithm, long assumedIntervalMillis, Clock ttlComparisonClock); @Override int hashCode(); @Override boolean equals(Object obj); static Granularity[] granularities(); static Granularity[] rollupGranularities(); static Granularity fromString(String s); static Granularity getRollupGranularity(String s); @Override String toString(); }
Granularity { @Override public boolean equals(Object obj) { if (!(obj instanceof Granularity)) return false; else return obj == this; } private  Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Granularity finer(); boolean isCoarser(Granularity other); long snapMillis(long millis); int slot(long millis); int slotFromFinerSlot(int finerSlot); Range deriveRange(int slot, long referenceMillis); static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points); static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points, String algorithm, long assumedIntervalMillis); static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points, String algorithm, long assumedIntervalMillis, Clock ttlComparisonClock); @Override int hashCode(); @Override boolean equals(Object obj); static Granularity[] granularities(); static Granularity[] rollupGranularities(); static Granularity fromString(String s); static Granularity getRollupGranularity(String s); @Override String toString(); static final int MILLISECONDS_IN_SLOT; static final Granularity FULL; static final Granularity MIN_5; static final Granularity MIN_20; static final Granularity MIN_60; static final Granularity MIN_240; static final Granularity MIN_1440; static final Granularity LAST; static final int MAX_NUM_SLOTS; }