org.abora.white.filter
Class OrFilter

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.spaces.basic.XnRegion
              |
              +--org.abora.white.filter.Filter
                    |
                    +--org.abora.white.filter.OrFilter

public class OrFilter
extends Filter


Field Summary
protected  ImmuSet mySubFilters
           
 
Fields inherited from class org.abora.white.filter.Filter
myCS
 
Constructor Summary
OrFilter(FilterSpace cs, ImmuSet subs)
           
OrFilter(Rcvr receiver)
           
 
Method Summary
 int actualHashForEqual()
          Defined by subclasses to produce the value returned by hashForEqual.
 XnRegion baseRegion()
          Essential.
 XnRegion complement()
          Essential.
 XnRegion fetchSpecialSubset(XnRegion other)
          return self or other if one is clearly a subset of the other, else NULL
 Stepper intersectedFilters()
          Essential.
 boolean isAllFilter()
          Essential.
 boolean isAnyFilter()
          Essential.
 boolean isEmpty()
          Every coordinate space has exactly one empty region.
 boolean isEqual(Heaper other)
          Two regions are equal iff they contain exactly the same set of positions
 boolean isFull()
          true if this is the largest possible region in this space -- the region that contains all positions in the space.
 boolean match(XnRegion region)
          tell whether a region passes this filter
 Filter pass(Joint parent)
          return the simplest filter for looking at the children
 void printOn(java.io.PrintWriter oo)
          This should rarely be overridden.
 XnRegion relevantRegion()
          The region which is relevant to this filter, i.e.
 void sendSelfTo(Xmtr xmtr)
           
 ImmuSet subFilters()
           
 Stepper unionedFilters()
          Essential.
 
Methods inherited from class org.abora.white.filter.Filter
actualStepper, andFilter, andFilterPrivate, asSimpleRegion, closedFilter, combineIntersect, combineIntersect, combineUnion, combineUnion, complexIntersect, complexUnion, coordinateSpace, count, distinctions, distributeIntersect, distributeIntersect, distributeUnion, distributeUnion, doesPass, fetchCanonicalIntersect, fetchCanonicalUnion, fetchIntersect, fetchPairIntersect, fetchPairUnion, fetchSpecialIntersect, fetchSpecialUnion, fetchUnion, filterSpace, getPairIntersect, getPairUnion, hasMember, info, intersect, intersectionFilter, isEnumerable, isFinite, isSimple, isSubsetOf, isSwitchedBy, isSwitchedOffBy, isSwitchedOnBy, notSubsetFilter, notSupersetFilter, openFilter, orFilter, orFilterPrivate, simpleRegions, simpleUnion, subsetFilter, supersetFilter, unionWith
 
Methods inherited from class org.abora.white.spaces.basic.XnRegion
chooseMany, chooseMany, chooseOne, chooseOne, delta, disjointSimpleRegions, disjointSimpleRegions, immuSet, intersects, isDistinction, isEnumerable, minus, simpleRegions, stepper, stepper, theOne, with, without
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
destroy, destruct, equals, hashForEqual, printContentsOn, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mySubFilters

protected ImmuSet mySubFilters
Constructor Detail

OrFilter

public OrFilter(FilterSpace cs,
                ImmuSet subs)

OrFilter

public OrFilter(Rcvr receiver)
Method Detail

actualHashForEqual

public int actualHashForEqual()
Description copied from class: Heaper
Defined by subclasses to produce the value returned by hashForEqual.

Overrides:
actualHashForEqual in class Filter

isAllFilter

public boolean isAllFilter()
Description copied from class: Filter
Essential. Whether this is an 'all' Filter, i.e. it only matches Regions which contain everything in the baseRegion

Specified by:
isAllFilter in class Filter

isAnyFilter

public boolean isAnyFilter()
Description copied from class: Filter
Essential. Whether this is an 'any' Filter, i.e. it matches Regions which contain anything in the baseRegion

Specified by:
isAnyFilter in class Filter

isEmpty

public boolean isEmpty()
Description copied from class: XnRegion
Every coordinate space has exactly one empty region. It is the one containing no positions. It and only it responds 'true' to this message.

Specified by:
isEmpty in class Filter

isEqual

public boolean isEqual(Heaper other)
Description copied from class: XnRegion
Two regions are equal iff they contain exactly the same set of positions

Specified by:
isEqual in class Filter

isFull

public boolean isFull()
Description copied from class: XnRegion
true if this is the largest possible region in this space -- the region that contains all positions in the space. Note that in a space which has no positions (which is perfectly valid), the one XuRegion would be both empty (since it has no positions) and full (since it has all the positions in the space).

Specified by:
isFull in class Filter

printOn

public void printOn(java.io.PrintWriter oo)
Description copied from class: Heaper
This should rarely be overridden. In Tofu, it prints ClassName(...), where ... is either produced by printInsideOn or is ??? if printInsideOn it not overridden.

Overrides:
printOn in class Heaper

complement

public XnRegion complement()
Description copied from class: XnRegion
Essential. Return a region of containing exactly those positions not in this region. The complement of a distinction must be a distinction.

Specified by:
complement in class Filter

match

public boolean match(XnRegion region)
tell whether a region passes this filter

Specified by:
match in class Filter

pass

public Filter pass(Joint parent)
return the simplest filter for looking at the children

Specified by:
pass in class Filter

subFilters

public ImmuSet subFilters()

fetchSpecialSubset

public XnRegion fetchSpecialSubset(XnRegion other)
return self or other if one is clearly a subset of the other, else NULL

Specified by:
fetchSpecialSubset in class Filter

intersectedFilters

public Stepper intersectedFilters()
Description copied from class: Filter
Essential. Break this up into a bunch of Filters which when intersected (anded) together give this one. If there is only one sub Filter it will be the receiver; otherwise, the sub Filters will be simple enough that either they or their complements will return true from at least one of isAndFilter or isOrFilter. If this is full (i.e. an open filter) then the stepper will have no elements.

Specified by:
intersectedFilters in class Filter

unionedFilters

public Stepper unionedFilters()
Description copied from class: Filter
Essential. Break this up into a bunch of Filters which when unioned (ored) together give this one. If there is only one sub Filter it will be the receiver; otherwise, the sub Filters will be simple enough that either they or their complements will return true from at least one of isAndFilter or isOrFilter. The sub Filters might not be disjoint Regions. If this is empty (i.e. a closed filter) then the stepper will have no elements.

Specified by:
unionedFilters in class Filter

baseRegion

public XnRegion baseRegion()
Description copied from class: Filter
Essential. A region in the base space identifying what kind of filter this is. Succeeds only if this isAnyFilter or isAllFilter.

Specified by:
baseRegion in class Filter

relevantRegion

public XnRegion relevantRegion()
Description copied from class: Filter
The region which is relevant to this filter, i.e. whose presence or absence in a region can change whether it passes the filter

Specified by:
relevantRegion in class Filter

sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Overrides:
sendSelfTo in class Filter


Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.