org.tigris.scarab.util.comparators
Class StartsWithPredicate

java.lang.Object
  extended byorg.tigris.scarab.util.comparators.StartsWithPredicate
All Implemented Interfaces:
org.apache.commons.collections.Predicate

public class StartsWithPredicate
extends java.lang.Object
implements org.apache.commons.collections.Predicate

Returns only strings that start with a specific string! Good for filtering through a long list of paramerters and only getting some back.

Author:
epugh

Constructor Summary
StartsWithPredicate(java.lang.String startsWith)
           
 
Method Summary
 boolean evaluate(java.lang.Object input)
          Takes in the input object, and call's it's toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartsWithPredicate

public StartsWithPredicate(java.lang.String startsWith)
Method Detail

evaluate

public boolean evaluate(java.lang.Object input)
Takes in the input object, and call's it's toString method. Then checks if it starts with the value.

Specified by:
evaluate in interface org.apache.commons.collections.Predicate


Copyright © 2000-2004 Tigris.org. All Rights Reserved.