DbSetId { @Override public boolean equals(Object obj) { return this == obj || (obj instanceof DbSetId && equals((DbSetId) obj)); } private  DbSetId(@NonNull String[] dimValues, @NonNull String[] dimColumns); @NonNull static DbSetId root(@NonNull String... dimColumns); int getLevel(); @NonNull String getValue(int index); int getMaxLevel(); @NonNull String getColumn(int index); int getDepth(); boolean isSeries(); @NonNull DbSetId child(@NonNull String... dimValues); boolean isRoot(); @NonNull Optional<DbSetId> parent(); @NonNull String[] selectColumns(); @NonNull String[] filterColumns(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); static final IConstraint<DbSetId> SERIES_CONSTRAINT; static final IConstraint<DbSetId> COLLECTION_CONSTRAINT; }
@Test public void testEquals() { assertTrue(ID0.equals(ID0)); assertFalse(ID0.equals(ID1)); assertFalse(ID1.equals(ID0)); assertTrue(ID0.child("A", "B").equals(ID0.child("A", "B"))); assertFalse(ID0.child("A", "B").equals(ID0.child("B", "A"))); }