org.nodal.type
Interface Restriction


public interface Restriction

A particular Restriction that represents a constraint on values of a particular set of Types.

Author:
Lee Iverson

Nested Class Summary
static class Restriction.CreationFailure
          An error class that may be thrown when a Restriction cannot be constructed.
 
Method Summary
 boolean accepts(boolean b)
          Check the constraint of this Restriction against the given value.
 boolean accepts(byte b)
           
 boolean accepts(char c)
           
 boolean accepts(double d)
           
 boolean accepts(float s)
           
 boolean accepts(int i)
           
 boolean accepts(long l)
           
 boolean accepts(java.lang.Object value)
           
 boolean accepts(short s)
           
 boolean acceptsNode(Node n)
           
 boolean acceptsString(java.lang.String s)
           
 boolean canRestrict(Type type)
          Can this Restriction be applied to this Type?
 

Method Detail

canRestrict

public boolean canRestrict(Type type)
Can this Restriction be applied to this Type?


accepts

public boolean accepts(boolean b)
Check the constraint of this Restriction against the given value.


accepts

public boolean accepts(char c)

accepts

public boolean accepts(byte b)

accepts

public boolean accepts(short s)

accepts

public boolean accepts(int i)

accepts

public boolean accepts(long l)

accepts

public boolean accepts(float s)

accepts

public boolean accepts(double d)

acceptsString

public boolean acceptsString(java.lang.String s)

acceptsNode

public boolean acceptsNode(Node n)

accepts

public boolean accepts(java.lang.Object value)