DbSetId { @NonNull public static DbSetId root(@NonNull String... dimColumns) throws IllegalArgumentException { for (String o : dimColumns) { if (o == null) { throw new IllegalArgumentException("Columns cannot be null"); } } return new DbSetId(Arrays2.EMPTY_STRING_ARRAY, dimColumns.clone()); } 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(expected = IllegalArgumentException.class) public void testRoot() { String[] tmp = new String[1]; tmp[0] = null; DbSetId.root(tmp); }
@Test(expected = NullPointerException.class) @SuppressWarnings({"null", "ConstantConditions"}) public void testRoot2() { DbSetId.root((String[])null); }