ST-Developer Java Reference

com.steptools.stdev
Class EnumerationDomain

java.lang.Object
  extended by com.steptools.stdev.Domain
      extended by com.steptools.stdev.EnumerationDomain

public class EnumerationDomain
extends Domain

Represents an EXPRESS ENUMERATION type.


Constructor Summary
EnumerationDomain(Class c)
          Reserved for EXPRESS classes
 
Method Summary
 Object convert(Object obj)
          Try to convert an object to a corresponding object of this type.
 Class domainClass()
           
 Enumeration forName(String name)
          Find the enumeration item for a given name
 Map<String,Enumeration> getItems()
          Get the Map of enumeration items.
 boolean isEnumeration()
           
 boolean typeIsa(Domain other)
          Tests if this Domain is assignable to the other Domain.
 
Methods inherited from class com.steptools.stdev.Domain
forClass, getName, isAggregate, isBoolean, isEntity, isInteger, isLogical, isReal, isSelect, isString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerationDomain

public EnumerationDomain(Class c)
Reserved for EXPRESS classes

Method Detail

typeIsa

public boolean typeIsa(Domain other)
Description copied from class: Domain
Tests if this Domain is assignable to the other Domain.

Specified by:
typeIsa in class Domain
Parameters:
other - The domain to compare to
Returns:
true If this domain is equal to or a subtype of the other Domain.

domainClass

public Class domainClass()
Specified by:
domainClass in class Domain

forName

public Enumeration forName(String name)
Find the enumeration item for a given name

Parameters:
name - The item to find.
Returns:
The item, or null it it is not found.

getItems

public Map<String,Enumeration> getItems()
Get the Map of enumeration items. The map is indexed by string.

Returns:
A Map

isEnumeration

public boolean isEnumeration()
Overrides:
isEnumeration in class Domain

convert

public Object convert(Object obj)
Description copied from class: Domain
Try to convert an object to a corresponding object of this type. Note that this is not a typecast method, instead, it is intended to provide a fallback to convert objects of the wrong type to the correct one. (This could be used, for example, after Attribute.setValue() throws a TypeException.)

Overrides:
convert in class Domain
Parameters:
obj - The object to convert.
Returns:
The other object converted to one of this domain. If the conversion is not possible, or not implemented, returns null.

ST-Developer Java Reference