Module xl.core

Interface FilterState

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 Type
    Method
    Description
    boolean
    Returns true iff the value which has been passed to the filter method is accepted by the filter, i.e., it it passes the filter.
    boolean
    Returns true iff all following input values of the filter method will not pass the filter.
  • Method Details

    • isAccepted

      boolean isAccepted()
      Returns true 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 methods BooleanFilterState.getBooleanResult(), ..., ObjectFilterState.getObjectResult() of the corresponding subinterfaces. Otherwise, no result is yielded.
    • isFinished

      boolean isFinished()
      Returns true 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