class CubeId {

    public boolean isAncestorOf(@NonNull CubeId input) {
        if (!haveSameDimensions(this, input) || getLevel() >= input.getLevel()) {
            return false;
        }
        for (int i = getLevel() - 1; i >= 0; i--) {
            if (!input.getDimensionValue(i).equals(getDimensionValue(i))) {
                return false;
            }
        }
        return true;
    }

    private  CubeId(@NonNull String[] dimensionIds, @NonNull String[] dimensionsValues);

}