Package com.luciad.multidimensional
Class TLcdDimensionFilter.Builder
java.lang.Object
com.luciad.multidimensional.TLcdDimensionFilter.Builder
- Enclosing class:
TLcdDimensionFilter
A builder for filters which reuses filter instances as much as possible.
This is safe because filters themselves are immutable.
- Since:
- 2016.0
-
Method Summary
Modifier and TypeMethodDescriptionall
(TLcdDimensionFilter aFilter) Sets all the given filter's values on this builder.build()
Builds a dimensional filter using this builder's current values.clear()
Clears this filter builder such thatfilter.clear().build() == EMPTY_FILTER
istrue
.filterDimension
(TLcdDimensionAxis<?> aAxis, TLcdDimensionInterval<?> aInterval) Sets the filter value for the given axis to the given interval.
-
Method Details
-
filterDimension
public TLcdDimensionFilter.Builder filterDimension(TLcdDimensionAxis<?> aAxis, TLcdDimensionInterval<?> aInterval) Sets the filter value for the given axis to the given interval. This will replace any existing entry for the given axis.- Parameters:
aAxis
- an axis to filter onaInterval
- the interval to filter on- Returns:
- this builder
-
all
Sets all the given filter's values on this builder.- Parameters:
aFilter
- a filter, must not benull
- Returns:
- this builder
-
clear
Clears this filter builder such thatfilter.clear().build() == EMPTY_FILTER
istrue
. This is useful for reusing a builder.- Returns:
- this builder
-
build
Builds a dimensional filter using this builder's current values. This builder reuses filters as much as possible, which is safe because filters are immutable. This means that if this builder was created from an existing filter and the builder was not modified, it will return the same instance of the filter it was created from:filter.asBuilder().build() == filter
istrue
.- Returns:
- a dimensional filter, never
null
-