org.simantics.databoard.type
Class UnionType
java.lang.Object
org.simantics.databoard.type.DataType
org.simantics.databoard.type.UnionType
public class UnionType
- extends DataType
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
components
public Component[] components
UnionType
public UnionType()
UnionType
public UnionType(Component... components)
addComponent
public void addComponent(java.lang.String name,
DataType type)
removeComponent
public void removeComponent(java.lang.String tagName)
getTagIndex
public java.lang.Integer getTagIndex(java.lang.String fieldName)
- Get tag by name.
- Parameters:
fieldName
- component name
- Returns:
- component index or
null
if one does not exist
getTagIndex2
public int getTagIndex2(java.lang.String fieldName)
- Get tag by name.
- Parameters:
fieldName
- component name
- Returns:
- component index or -1 if one does not exist
getComponentType
public DataType getComponentType(java.lang.String fieldName)
- Get component Datatype by field name
- Parameters:
fieldName
-
- Returns:
- datatype or
null
getComponent
public Component getComponent(java.lang.String fieldName)
- Get component by name.
- Parameters:
fieldName
- component name
- Returns:
- component or
null
if one does not exist
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
accept
public void accept(DataType.Visitor1 v,
java.lang.Object obj)
- Specified by:
accept
in class DataType
accept
public <T> T accept(DataType.Visitor<T> v)
- Specified by:
accept
in class DataType
count
public int count()
getComponentIndex
public java.lang.Integer getComponentIndex(java.lang.String tagName)
getComponent
public Component getComponent(int i)
getComponents
public Component[] getComponents()