org.nodal.type
Interface NodeType

All Superinterfaces:
Nameable, Type
All Known Subinterfaces:
MapType, MapType.Editor, NodeType.Editor, RecordType, RecordType.Editor, SequenceType, SequenceType.Editor, UnionType, UnionType.Editor

public interface NodeType
extends Type

The Types associated with Nodes.

These Types are all collection types, with a specific property type and then a keyType that is derivable from the property.

Any instance of a NodeType is one of MapType, RecordType or SequenceType and the asFoo() methods may be used to downcast.

The Types are optionally modifiable via the TypeEditor interface.

Author:
Lee Iverson
See Also:
MapType, RecordType, SequenceType

Nested Class Summary
static interface NodeType.Editor
          The basic interface for modifying a NodeType.
 
Method Summary
 MapType asMapType()
          The NodeType as a MapType.
 RecordType asRecordType()
          The NodeType as a RecordType.
 SequenceType asSequenceType()
          The NodeType as a SequenceType.
 NodeType.Editor edit()
          Return an interface for editing this NodeType.
 Type propertyType()
          The Type of the properties of one of these Nodes.
 Type valueType(java.lang.Object property)
          The Type of a value associated with the given property.
 
Methods inherited from interface org.nodal.type.Type
accepts, accepts, accepts, accepts, accepts, accepts, accepts, accepts, accepts, acceptsNode, acceptsString, acceptsType, from, from, from, from, from, from, from, from, from, fromNode, fromString, isNodeType, type
 
Methods inherited from interface org.nodal.util.Nameable
name, setName
 

Method Detail

propertyType

public Type propertyType()
The Type of the properties of one of these Nodes.


valueType

public Type valueType(java.lang.Object property)
The Type of a value associated with the given property.


asMapType

public MapType asMapType()
The NodeType as a MapType.

Exactly one of asMapType, asRecordType or asSequenceType will return non-null.


asRecordType

public RecordType asRecordType()
The NodeType as a RecordType.

Exactly one of asMapType, asRecordType or asSequenceType will return non-null.


asSequenceType

public SequenceType asSequenceType()
The NodeType as a SequenceType.

Exactly one of asMapType, asRecordType or asSequenceType will return non-null.


edit

public NodeType.Editor edit()
Return an interface for editing this NodeType.

Returns null if no modification permissions exist for this instance.