org.norther.tammi.acorn.type
Class IncludeFilter

java.lang.Object
  extended by org.norther.tammi.acorn.type.IncludeFilter
All Implemented Interfaces:
Serializable, AttributeFilter

public class IncludeFilter
extends Object
implements AttributeFilter, Serializable

A case-insensitive include filter for importing and exporting attributes.

Version:
$Id: IncludeFilter.java,v 1.4 2010-03-04 17:39:08 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.norther.tammi.acorn.type.AttributeFilter
DISCARDED
 
Constructor Summary
IncludeFilter(Collection<String> c)
          Constructs a new filter.
IncludeFilter(String... names)
          Constructs a new filter for the specified names.
 
Method Summary
 Attribute filter(Object object, String name, Object value)
          Filters an attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncludeFilter

public IncludeFilter(String... names)
Constructs a new filter for the specified names.

Parameters:
names - included attribute names.

IncludeFilter

public IncludeFilter(Collection<String> c)
Constructs a new filter. The collection must contain included attribute names in lowercase.

Parameters:
c - included attribute names.
Method Detail

filter

public Attribute filter(Object object,
                        String name,
                        Object value)
Description copied from interface: AttributeFilter
Filters an attribute. This method is called when transporting attributes.

Specified by:
filter in interface AttributeFilter
Parameters:
object - the object importing or exporting the attribute.
name - the name of the attribute.
value - the value of the attribute.
Returns:
the filtered attribute or null if unchanged.


Copyright © 2004 The Norther Organization. All rights reserved.