org.jboss.kernel.plugins.dependency
Class IntervalMatcher

java.lang.Object
  extended by org.jboss.kernel.api.dependency.NonNullMatcher
      extended by org.jboss.kernel.api.dependency.ClassMatcher<Number>
          extended by org.jboss.kernel.api.dependency.NumberMatcher
              extended by org.jboss.kernel.plugins.dependency.IntervalMatcher
All Implemented Interfaces:
Serializable, Matcher

public class IntervalMatcher
extends NumberMatcher
implements Serializable

Interval matcher.

Author:
Ales Justin
See Also:
Serialized Form

Constructor Summary
IntervalMatcher(Number floor, Number ceiling, boolean floorIsGreaterThan, boolean ceilingIsLessThan)
           
 
Method Summary
protected  int compareTo(Number other, Number edge, int defaultValue)
          Compare other value with edge value.
protected  boolean matchByType(Number other)
          Match by type.
 String toString()
           
 
Methods inherited from class org.jboss.kernel.api.dependency.ClassMatcher
internalMatch
 
Methods inherited from class org.jboss.kernel.api.dependency.NonNullMatcher
match, needExactMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntervalMatcher

public IntervalMatcher(Number floor,
                       Number ceiling,
                       boolean floorIsGreaterThan,
                       boolean ceilingIsLessThan)
Method Detail

compareTo

protected int compareTo(Number other,
                        Number edge,
                        int defaultValue)
Compare other value with edge value. Return default value if edge is null.

Parameters:
other - the other
edge - the edge
defaultValue - default value
Returns:
-1 if edge greater than other, 1 if other greater than edge, 0 if equal

matchByType

protected boolean matchByType(Number other)
Description copied from class: ClassMatcher
Match by type.

Specified by:
matchByType in class ClassMatcher<Number>
Parameters:
other - the T para to match
Returns:
true if matched, false otherwise

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.