class DimensionsDefinition {

    private Set<DimensionDefinition> dimensions = new HashSet<>();

    private Logical logical = Logical.DEFAULT;

    public void addDimension(DimensionDefinition definition) {
        dimensions.add(definition);
    }

    public boolean isEmpty(){
        return CollectionUtils.isEmpty(this.dimensions);
    }

    public boolean hasDimension(Dimension dimension) {
        return dimensions
                .stream()
                .anyMatch(def ->
                        def.getTypeId().equals(dimension.getType().getId())
                                && def.hasDimension(dimension.getId()));
    }

    public boolean hasDimension(List<Dimension> dimensions) {<FILL_FUNCTION_BODY>}
}


        if (logical == Logical.AND) {
            return dimensions.stream().allMatch(this::hasDimension);
        }

        return dimensions.stream().anyMatch(this::hasDimension);
    
<no_super_class>