terp - the Codemesh Modular
Template Interpreter v1.3.309

com.codemesh.terp.api
Interface Selector<T>

All Known Implementing Classes:
IsFileTypeExecutor, Selector.AbstractSelector

public interface Selector<T>

A filter that accepts or rejects items from a collection.


Nested Class Summary
static class Selector.AbstractSelector<T>
          A baseclass for concrete selectors.
 
Field Summary
static java.util.List<java.lang.Object> NO_ARGS
           
static java.lang.String[] NO_PARAM_NAMES
           
 
Method Summary
 java.lang.String getItemName()
          Returns the name used for the item that is being tested.
 java.lang.String[] getParamNames()
          Returns the parameter names.
 boolean selects(T item, java.lang.Object owner)
          Returns true if the given item satisfies the selector's criteria.
 boolean selects(T item, java.lang.Object owner, java.util.List<java.lang.Object> args)
          Returns true if the given item satisfies the selector's criteria.
 

Field Detail

NO_ARGS

static final java.util.List<java.lang.Object> NO_ARGS

NO_PARAM_NAMES

static final java.lang.String[] NO_PARAM_NAMES
Method Detail

getItemName

java.lang.String getItemName()
Returns the name used for the item that is being tested.

Returns:
a name.

getParamNames

java.lang.String[] getParamNames()
Returns the parameter names.

Returns:
an array of names.

selects

boolean selects(T item,
                java.lang.Object owner)
Returns true if the given item satisfies the selector's criteria.

Parameters:
item - the item to test.
owner - the item's owner, i.e. the object from which items are being selected.
Returns:
true if selection criteria are met.

selects

boolean selects(T item,
                java.lang.Object owner,
                java.util.List<java.lang.Object> args)
Returns true if the given item satisfies the selector's criteria.

Parameters:
item - the item to test.
owner - the item's owner, i.e. the object from which items are being selected.
args - the arguments to be taken into account in the test. @return true if selection criteria are met.

terp - the Codemesh Modular
Template Interpreter v1.3.309

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.