org.springframework.rules.constraint
Class Like

java.lang.Object
  extended by org.springframework.rules.constraint.Like
All Implemented Interfaces:
Constraint

public class Like
extends Object
implements Constraint

A like constraint, supporting "starts with%", "%ends with", and "%contains%".

Author:
Keith Donald

Nested Class Summary
static class Like.LikeType
           
 
Field Summary
static Like.LikeType CONTAINS
           
static Like.LikeType ENDS_WITH
           
static Like.LikeType STARTS_WITH
           
 
Constructor Summary
Like(Like.LikeType type, String likeString)
           
Like(String encodedLikeString)
           
 
Method Summary
 String getString()
           
 Like.LikeType getType()
           
 boolean test(Object argument)
          Test the provided argument against this predicate's condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTS_WITH

public static final Like.LikeType STARTS_WITH

ENDS_WITH

public static final Like.LikeType ENDS_WITH

CONTAINS

public static final Like.LikeType CONTAINS
Constructor Detail

Like

public Like(Like.LikeType type,
            String likeString)

Like

public Like(String encodedLikeString)
Method Detail

test

public boolean test(Object argument)
Description copied from interface: Constraint
Test the provided argument against this predicate's condition.

Specified by:
test in interface Constraint
Parameters:
argument - the argument value
Returns:
true if the condition was satisfied, false otherwise

getType

public Like.LikeType getType()

getString

public String getString()


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.