cz.cmc.tcgui.datadef
Class Attribute

java.lang.Object
  extended bycz.cmc.tcgui.datadef.TCEntry
      extended bycz.cmc.tcgui.datadef.AttributeEntry
          extended bycz.cmc.tcgui.datadef.Attribute
All Implemented Interfaces:
Cloneable

public class Attribute
extends AttributeEntry

Attribute describes a single attribute.


Field Summary
protected  AttributeType type
          Type of the attribute
 
Fields inherited from class cz.cmc.tcgui.datadef.AttributeEntry
generated, interpreted, maxInstances, minInstances, parent, position, UNLIMITED_INSTANCES, virtual
 
Fields inherited from class cz.cmc.tcgui.datadef.TCEntry
description, id, label, name
 
Constructor Summary
Attribute()
          Creates a new Attribute
Attribute(AttributeType type)
          Creates a new Attribute with the given type
Attribute(String id, String name, String label, AttributeType type)
          Creates a new Attribute with given id, name, label and type
 
Method Summary
 Object clone()
          Clones this Attribute
 AttributeType getType()
          Returns the type of this attribute.
 void setType(AttributeType type)
          Sets the type of this Attribute.
 
Methods inherited from class cz.cmc.tcgui.datadef.AttributeEntry
getGenerated, getInterpreted, getMaxInstances, getMinInstances, getParent, getPosition, getVirtual, setGenerated, setInterpreted, setMaxInstances, setMinInstances, setParent, setPosition, setVirtual, toString
 
Methods inherited from class cz.cmc.tcgui.datadef.TCEntry
getDescription, getID, getLabel, getName, setDescription, setID, setLabel, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected AttributeType type
Type of the attribute

Constructor Detail

Attribute

public Attribute()
Creates a new Attribute


Attribute

public Attribute(AttributeType type)
Creates a new Attribute with the given type


Attribute

public Attribute(String id,
                 String name,
                 String label,
                 AttributeType type)
Creates a new Attribute with given id, name, label and type

Parameters:
id - id of the AttributeEntry
name - name of the AttributeEntry
label - human-readable label of the AttributeEntry
type - AttributeType of the Attribute
Method Detail

setType

public void setType(AttributeType type)
Sets the type of this Attribute.

Parameters:
type - specific type object implementing AttributeType

getType

public AttributeType getType()
Returns the type of this attribute.

Returns:
specific type object implementing AttributeType

clone

public Object clone()
Clones this Attribute

Overrides:
clone in class AttributeEntry
Returns:
cloned Attribute