Class DefaultRestrictor

java.lang.Object
nz.org.riskscape.engine.restriction.DefaultRestrictor
All Implemented Interfaces:
AutoCloseable, Predicate<Tuple>, Realized, Restrictor

public class DefaultRestrictor extends Object implements Restrictor
  • Constructor Details

  • Method Details

    • test

      public boolean test(Tuple t)
      Specified by:
      test in interface Predicate<Tuple>
    • close

      public void close()
      Description copied from interface: Realized

      Clean up any resources allocated to this Realized thing. This might involve removing temporary files, closing or flushing a network connection to some external service, or terminating some child processes. Note that it's expected that this object won't be used again after being closed.

      In some instances, implementations may want to remove references to large (in terms of memory) objects so that they can be garbage collected even if references to the pipeline continue to keep them 'live' in the JVM's object graph

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Realized
    • getSourceType

      public Struct getSourceType()
      Description copied from interface: Restrictor

      The exact Struct that Tuple's passed to Predicate.test(java.lang.Object) should be of.

      Specified by:
      getSourceType in interface Restrictor
    • getPredicate

      public Predicate<Tuple> getPredicate()