net.dpml.library.info
Class SimpleFilterDirective

java.lang.Object
  extended bynet.dpml.lang.AbstractDirective
      extended bynet.dpml.library.info.FilterDirective
          extended bynet.dpml.library.info.SimpleFilterDirective
All Implemented Interfaces:
Filter, Serializable

public class SimpleFilterDirective
extends FilterDirective

Simple value filter.

Version:
1.0.0
Author:
The Digital Product Meta Library
See Also:
Serialized Form

Constructor Summary
SimpleFilterDirective(String token, String value)
          Creation of a new anonymous resource directive.
 
Method Summary
 boolean equals(Object other)
          Compare this object with another for equality.
 String getValue(Resource resource)
          Return the filter value.
 int hashCode()
          Compute the hash value.
 
Methods inherited from class net.dpml.library.info.FilterDirective
getToken
 
Methods inherited from class net.dpml.lang.AbstractDirective
equals, hashArray, hashValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFilterDirective

public SimpleFilterDirective(String token,
                             String value)
Creation of a new anonymous resource directive.

Parameters:
token - the filter token
value - the substitution value
Method Detail

getValue

public String getValue(Resource resource)
                throws ResourceNotFoundException
Return the filter value.

Specified by:
getValue in interface Filter
Specified by:
getValue in class FilterDirective
Parameters:
resource - the enclosing resource
Returns:
the resolved value
Throws:
ResourceNotFoundException - (never thrown)

equals

public boolean equals(Object other)
Compare this object with another for equality.

Overrides:
equals in class FilterDirective
Parameters:
other - the other object
Returns:
true if equal

hashCode

public int hashCode()
Compute the hash value.

Overrides:
hashCode in class FilterDirective
Returns:
the hashcode value