/** * Creates a new ApiFilter based on this ApiFilter, except with the new set of filter values replacing this * ApiFilter's filter values. * * @param values The new set of values to use in the new ApiFilter * * @return the new ApiFilter object */ public ApiFilter withValues(Collection<String> values) { return new ApiFilter(dimension, dimensionField, operation, values); }
/** * Creates a new ApiFilter based on this ApiFilter, except with the new DimensionField replacing this ApiFilter's * DimensionField. * * @param dimensionField The new DimensionField to use in the new ApiFilter. * @return the new ApiFilter object. */ public ApiFilter withDimensionField(DimensionField dimensionField) { return new ApiFilter(dimension, dimensionField, operation, values); }
/** * Creates a new ApiFilter based on this ApiFilter, except with the new dimension replacing this ApiFilter's * dimension. * * @param dimension The new dimension to use in the new ApiFilter. * @return the new ApiFilter object. */ public ApiFilter withDimension(Dimension dimension) { return new ApiFilter(dimension, dimensionField, operation, values); }
/** * Creates a new ApiFilter based on this ApiFilter, except with the new FilterOperation replacing this ApiFilter's * FilterOperation. * * @param operation The new operation to use in the new ApiFilter. * @return the new ApiFilter object. */ public ApiFilter withOperation(FilterOperation operation) { return new ApiFilter(dimension, dimensionField, operation, values); }
/** * Constructor. * * @param dimensionMappingValues The map of dimension to sets of dimension values which map this table. */ public DimensionIdFilter(Map<Dimension, Set<String>> dimensionMappingValues) { dimensionKeySelectFilters = dimensionMappingValues.entrySet().stream() .map(entry -> new AbstractMap.SimpleEntry<>( entry.getKey(), new ApiFilter( entry.getKey(), entry.getKey().getKey(), DefaultFilterOperation.in, entry.getValue() ) )) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); }
.map(it -> new ApiFilter( it.getKey().getLeft(), it.getKey().getMiddle(),
ApiFilter inProgressApiFilter = new ApiFilter(null, null, null, new LinkedHashSet<>());