GrammarScope  4.0.0
Public Member Functions | Protected Attributes | Package Functions | List of all members
grammarscope.filter.BasicFilter< T extends HasId > Class Template Reference
Inheritance diagram for grammarscope.filter.BasicFilter< T extends HasId >:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.filter.BasicFilter< T extends HasId >:
Collaboration graph
[legend]

Public Member Functions

 BasicFilter (final boolean acceptNullFlag)
 
boolean accept (final HasId hasId)
 
boolean accept (final String id)
 
Collection< String > keys ()
 
void setAccept (final String id, final boolean flag)
 
- Public Member Functions inherited from grammarscope.server.iface.IFilter< T >
boolean accept (T obj)
 

Protected Attributes

final boolean acceptNull
 
Map< String, Boolean > acceptMap
 

Package Functions

public< E extends HasId > List< E > filter (final Collection< E > list0)
 

Constructor & Destructor Documentation

◆ BasicFilter()

grammarscope.filter.BasicFilter< T extends HasId >.BasicFilter ( final boolean  acceptNullFlag)

Constructor

Parameters
acceptNullFlagwhether null flag means accept

Member Function Documentation

◆ accept() [1/2]

boolean grammarscope.filter.BasicFilter< T extends HasId >.accept ( final HasId  hasId)

◆ accept() [2/2]

boolean grammarscope.filter.BasicFilter< T extends HasId >.accept ( final String  id)

Checks if the given object passes the filter.

Parameters
idid to test
Returns
whether the name should be accepted (for some processing)

Implements grammarscope.server.iface.IFilter< T >.

◆ filter()

public<E extends HasId> List<E> grammarscope.filter.BasicFilter< T extends HasId >.filter ( final Collection< E >  list0)
package

Filter list of objects having id

Parameters
list0source list of objects
<E>element type
Returns
sorted list of acceptable objects

◆ keys()

Collection<String> grammarscope.filter.BasicFilter< T extends HasId >.keys ( )

Get keys

Returns
keys

Implements grammarscope.server.iface.IFilter< T >.

◆ setAccept()

void grammarscope.filter.BasicFilter< T extends HasId >.setAccept ( final String  id,
final boolean  value 
)

Set acceptance value for object.

Parameters
idobject id to test
valuevalue

Implements grammarscope.iface.IMutableFilter< T >.

Member Data Documentation

◆ acceptMap

Map<String, Boolean> grammarscope.filter.BasicFilter< T extends HasId >.acceptMap
protected

Accept map

◆ acceptNull

final boolean grammarscope.filter.BasicFilter< T extends HasId >.acceptNull
protected

Null is false


The documentation for this class was generated from the following file: