Interface DatatypeFilter

All Known Implementing Classes:
HomogeneousAggregate, MetaTypeFilter, SizeRestrictedFilter

public interface DatatypeFilter
A filter selecting a specific class of data-type. A test of whether data-type belongs to its class can be performed by calling the filter() method.
  • Method Details

    • clone

      Make a copy of this filter
      Returns:
      the new copy
    • isEquivalent

      boolean isEquivalent(DatatypeFilter op)
      Test if the given filter is configured and performs identically to this
      Parameters:
      op - is the given filter
      Returns:
      true if the two filters are equivalent
    • filter

      boolean filter(DataType dt)
      Test whether the given data-type belongs to this filter's data-type class
      Parameters:
      dt - is the given data-type to test
      Returns:
      true if the data-type is in the class, false otherwise
    • encode

      void encode(Encoder encoder) throws IOException
      Encode this filter and its configuration to a stream
      Parameters:
      encoder - is the stream encoder
      Throws:
      IOException - for problems writing to the stream
    • restoreXml

      void restoreXml(XmlPullParser parser) throws XmlParseException
      Configure details of the data-type class being filtered from the given stream
      Parameters:
      parser - is the given stream decoder
      Throws:
      XmlParseException - if there are problems with the stream
    • restoreFilterXml

      static DatatypeFilter restoreFilterXml(XmlPullParser parser) throws XmlParseException
      Instantiate a filter from the given stream.
      Parameters:
      parser - is the given stream decoder
      Returns:
      the new data-type filter instance
      Throws:
      XmlParseException - for problems reading the stream