com.xerox.bantam
Interface TypeDescriptor

All Known Implementing Classes:
ClassTypeDescriptor

public interface TypeDescriptor

The interface to a type description object for expressing value type constraints in Schemas.

Version:
$Revision: 1.4 $, $Date: 2000/03/14 18:31:59 $
Author:
John Lamping

Method Summary
 boolean contains(Object item)
          return true if the item is in the type
 String description()
          return a string describing the possible values, suitable for an error message or other guidance to the user
 Class getBaseType()
          The primitive class with represents this type.
 Object parse(String name)
          parse the string into an object satisfying the type, if possible return null if that is not possible
 Collection possibleValues()
          return a collection of all possible values of the type.
 

Method Detail

contains

public boolean contains(Object item)
return true if the item is in the type

getBaseType

public Class getBaseType()
The primitive class with represents this type.

possibleValues

public Collection possibleValues()
return a collection of all possible values of the type. return null if the possible values can't be enumerated.

description

public String description()
return a string describing the possible values, suitable for an error message or other guidance to the user

parse

public Object parse(String name)
parse the string into an object satisfying the type, if possible return null if that is not possible

Project Harland