com.monad.homerun.filter
Class ComponentScreen

java.lang.Object
  extended by com.monad.homerun.filter.Screen
      extended by com.monad.homerun.filter.ComponentScreen
All Implemented Interfaces:
java.io.Serializable

public class ComponentScreen
extends Screen

ComponentScreen extends Screen to describe possession of controls, models, and emitters. That is, the screen passes the object if it has or lacks the named component.

See Also:
Serialized Form

Field Summary
static java.lang.String COMP_CTRL
           
static java.lang.String COMP_EMTR
           
static java.lang.String COMP_MODEL
           
static int OP_HAS
           
static int OP_LACKS
           
 
Fields inherited from class com.monad.homerun.filter.Screen
COMPONENT, FILTER, INST_PROP, LIST, RELATION, TYPE, TYPE_PROP
 
Constructor Summary
ComponentScreen()
           
ComponentScreen(boolean alternate, java.lang.String compName, java.lang.String compType, int operator)
           
ComponentScreen(ComponentScreen screen)
           
 
Method Summary
 java.lang.String getComponentName()
          Returns the component name
 java.lang.String getComponentType()
          Returns the conponent type (model, emitter, control)
 int getOperator()
          Returns the screen operator
 boolean isRuntime(Screener screener)
          Returns true if testing screen relies on runtime state of system
 boolean pass(Screener screener, java.lang.String domain, java.lang.String objectName, FilterTrace trace)
          Tests the object against the screen (with optional tracing)
 java.lang.String toString()
          Returns a string representation of the Screen
 boolean validate(Screener screener, java.lang.String domain, FilterTrace trace)
          Validates the terms of the screen with optional tracing
 
Methods inherited from class com.monad.homerun.filter.Screen
clone, getNote, getType, isAlternate, setNote
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMP_CTRL

public static final java.lang.String COMP_CTRL
See Also:
Constant Field Values

COMP_EMTR

public static final java.lang.String COMP_EMTR
See Also:
Constant Field Values

COMP_MODEL

public static final java.lang.String COMP_MODEL
See Also:
Constant Field Values

OP_HAS

public static final int OP_HAS
See Also:
Constant Field Values

OP_LACKS

public static final int OP_LACKS
See Also:
Constant Field Values
Constructor Detail

ComponentScreen

public ComponentScreen()

ComponentScreen

public ComponentScreen(boolean alternate,
                       java.lang.String compName,
                       java.lang.String compType,
                       int operator)

ComponentScreen

public ComponentScreen(ComponentScreen screen)
Method Detail

getComponentName

public java.lang.String getComponentName()
Returns the component name

Returns:
component the component name

getComponentType

public java.lang.String getComponentType()
Returns the conponent type (model, emitter, control)

Returns:
type the component type

getOperator

public int getOperator()
Returns the screen operator

Returns:
oper the screen operator

toString

public java.lang.String toString()
Description copied from class: Screen
Returns a string representation of the Screen

Overrides:
toString in class Screen
Returns:
a descriptive screen

isRuntime

public boolean isRuntime(Screener screener)
Description copied from class: Screen
Returns true if testing screen relies on runtime state of system

Specified by:
isRuntime in class Screen
Returns:
true if runtime

validate

public boolean validate(Screener screener,
                        java.lang.String domain,
                        FilterTrace trace)
Validates the terms of the screen with optional tracing

Specified by:
validate in class Screen
Parameters:
screener - the Screening agent
domain - the domain of the object being screened
trace - the optional trace object
Returns:
true if screen valid

pass

public boolean pass(Screener screener,
                    java.lang.String domain,
                    java.lang.String objectName,
                    FilterTrace trace)
Tests the object against the screen (with optional tracing)

Specified by:
pass in class Screen
Parameters:
screener - the Screening agent
domain - the domain of the object being screened
objectName - the object being screened
trace - the optional trace object
Returns:
true if object passes through screen


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.