@Test public void testChild() { assertThatThrownBy(() -> EMPTY.child("hello")).isInstanceOf(IllegalArgumentException.class); assertThatThrownBy(() -> EMPTY.child((String) null)).isInstanceOf(IllegalArgumentException.class); assertThatThrownBy(() -> EMPTY.child("hello", null)).isInstanceOf(IllegalArgumentException.class); assertThatThrownBy(() -> EMPTY.child((String[]) null)).isInstanceOf(NullPointerException.class); }
@NonNull public CubeId child(@NonNull String... dimensionValues) throws IllegalArgumentException { if (this.dimensionsValues.length + dimensionValues.length > dimensionIds.length) { throw new IllegalArgumentException("Too much values"); } for (String o : dimensionValues) { if (o == null) { throw new IllegalArgumentException("Dimension values cannot be null"); } } return new CubeId(dimensionIds, Arrays2.concat(this.dimensionsValues, dimensionValues)); }
CubeId { @NonNull public CubeId child(@NonNull String... dimensionValues) throws IllegalArgumentException { if (this.dimensionsValues.length + dimensionValues.length > dimensionIds.length) { throw new IllegalArgumentException("Too much values"); } for (String o : dimensionValues) { if (o == null) { throw new IllegalArgumentException("Dimension values cannot be null"); } } return new CubeId(dimensionIds, Arrays2.concat(this.dimensionsValues, dimensionValues)); } }
CubeId { @NonNull public CubeId child(@NonNull String... dimensionValues) throws IllegalArgumentException { if (this.dimensionsValues.length + dimensionValues.length > dimensionIds.length) { throw new IllegalArgumentException("Too much values"); } for (String o : dimensionValues) { if (o == null) { throw new IllegalArgumentException("Dimension values cannot be null"); } } return new CubeId(dimensionIds, Arrays2.concat(this.dimensionsValues, dimensionValues)); } private  CubeId(@NonNull String[] dimensionIds, @NonNull String[] dimensionsValues); }
CubeId { @NonNull public CubeId child(@NonNull String... dimensionValues) throws IllegalArgumentException { if (this.dimensionsValues.length + dimensionValues.length > dimensionIds.length) { throw new IllegalArgumentException("Too much values"); } for (String o : dimensionValues) { if (o == null) { throw new IllegalArgumentException("Dimension values cannot be null"); } } return new CubeId(dimensionIds, Arrays2.concat(this.dimensionsValues, dimensionValues)); } private  CubeId(@NonNull String[] dimensionIds, @NonNull String[] dimensionsValues); @NonNull static CubeId root(@NonNull String... dimensionIds); @NonNull static CubeId root(@NonNull List<String> dimensionIds); @NonNegative int getLevel(); @NonNegative int getMaxLevel(); @NonNull String getDimensionValue(@NonNegative int index); @NonNull Stream<String> getDimensionValueStream(); @NonNull String getDimensionId(@NonNegative int index); @NonNegative int getDepth(); boolean isRoot(); boolean isSeries(); boolean isVoid(); @NonNull CubeId child(@NonNull String... dimensionValues); boolean isAncestorOf(@NonNull CubeId input); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
CubeId { @NonNull public CubeId child(@NonNull String... dimensionValues) throws IllegalArgumentException { if (this.dimensionsValues.length + dimensionValues.length > dimensionIds.length) { throw new IllegalArgumentException("Too much values"); } for (String o : dimensionValues) { if (o == null) { throw new IllegalArgumentException("Dimension values cannot be null"); } } return new CubeId(dimensionIds, Arrays2.concat(this.dimensionsValues, dimensionValues)); } private  CubeId(@NonNull String[] dimensionIds, @NonNull String[] dimensionsValues); @NonNull static CubeId root(@NonNull String... dimensionIds); @NonNull static CubeId root(@NonNull List<String> dimensionIds); @NonNegative int getLevel(); @NonNegative int getMaxLevel(); @NonNull String getDimensionValue(@NonNegative int index); @NonNull Stream<String> getDimensionValueStream(); @NonNull String getDimensionId(@NonNegative int index); @NonNegative int getDepth(); boolean isRoot(); boolean isSeries(); boolean isVoid(); @NonNull CubeId child(@NonNull String... dimensionValues); boolean isAncestorOf(@NonNull CubeId input); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }