- All Known Subinterfaces:
BooleanFilterState
,ByteFilterState
,CharFilterState
,DoubleFilterState
,FloatFilterState
,IntFilterState
,LongFilterState
,ObjectFilterState<T>
,ShortFilterState
public interface FilterState
An instance of
FilterState
is used in filter method
invocations as specified by the XL programming language.
Filter methods use such an instance to store state information
which they need to perform the filtering, and to tell the invoker
about the result of their application to the current input value.
This interface is abstract in the sense that only its direct
subinterfaces BooleanFilterState
, ...,
ObjectFilterState
are used by the specification of
the XL programming language and only those should be implemented.
- Author:
- Ole Kniemeyer
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
iff the value which has been passed to the filter method is accepted by the filter, i.e., it it passes the filter.boolean
Returnstrue
iff all following input values of the filter method will not pass the filter.
-
Method Details
-
isAccepted
boolean isAccepted()Returnstrue
iff the value which has been passed to the filter method is accepted by the filter, i.e., it it passes the filter. If this is the case, the result of the filter is given by the invocation of the methodsBooleanFilterState.getBooleanResult()
, ...,ObjectFilterState.getObjectResult()
of the corresponding subinterfaces. Otherwise, no result is yielded. -
isFinished
boolean isFinished()Returnstrue
iff all following input values of the filter method will not pass the filter. This is used to indicate the invoker of the filter method that it must not invoke the filter method any more, even if there are values left for filtering.- Returns:
true
iff following values won't pass the filter
-