-
- All Implemented Interfaces:
public final class SearchSpec<T extends Component>A criterion for matching components. The component must match all of non-null fields.
You can add more properties, simply by creating a write-only property which will register a new predicate on write. See Adding support for custom search criteria for more details.
-
-
Field Summary
Fields Modifier and Type Field Description private final Class<T>clazzprivate Stringidprivate Stringcaptionprivate Stringplaceholderprivate Stringtextprivate IntRangecountprivate Objectvalueprivate Stringclassesprivate StringwithoutClassesprivate List<Predicate<T>>predicatesprivate Stringthemesprivate StringwithoutThemes
-
Method Summary
Modifier and Type Method Description final Class<T>getClazz()final StringgetId()final UnitsetId(String id)final StringgetCaption()final UnitsetCaption(String caption)final StringgetPlaceholder()final UnitsetPlaceholder(String placeholder)final StringgetText()final UnitsetText(String text)final IntRangegetCount()final UnitsetCount(IntRange count)final ObjectgetValue()final UnitsetValue(Object value)final StringgetClasses()final UnitsetClasses(String classes)final StringgetWithoutClasses()final UnitsetWithoutClasses(String withoutClasses)final List<Predicate<T>>getPredicates()final UnitsetPredicates(List<Predicate<T>> predicates)final StringgetThemes()final UnitsetThemes(String themes)final StringgetWithoutThemes()final UnitsetWithoutThemes(String withoutThemes)StringtoString()final UnitcaptionContains(String substring)Makes sure that the component's Component.caption contains given substring. final Function1<Component, Boolean>toPredicate()Returns a predicate which matches components based on this spec. -
-
Method Detail
-
getCaption
final String getCaption()
-
setCaption
final Unit setCaption(String caption)
-
getPlaceholder
final String getPlaceholder()
-
setPlaceholder
final Unit setPlaceholder(String placeholder)
-
getClasses
final String getClasses()
-
setClasses
final Unit setClasses(String classes)
-
getWithoutClasses
final String getWithoutClasses()
-
setWithoutClasses
final Unit setWithoutClasses(String withoutClasses)
-
getPredicates
final List<Predicate<T>> getPredicates()
-
setPredicates
final Unit setPredicates(List<Predicate<T>> predicates)
-
getWithoutThemes
final String getWithoutThemes()
-
setWithoutThemes
final Unit setWithoutThemes(String withoutThemes)
-
captionContains
final Unit captionContains(String substring)
Makes sure that the component's Component.caption contains given substring.
-
toPredicate
final Function1<Component, Boolean> toPredicate()
Returns a predicate which matches components based on this spec. All rules are matched except the count rule. The rules are matched against given component only (not against its children).
-
-
-
-