tico.rules
Class TLimitation

java.lang.Object
  extended by tico.rules.TLimitation

public class TLimitation
extends java.lang.Object

The TLimitation object contains a name, a nameXML a value and a list of attributes.

Version:
1.0 Sep 27, 2007
Author:
Beatriz Mateo

Constructor Summary
TLimitation()
          Creates a new empty TLimitation with no initial name or value.
TLimitation(int value)
          Creates a new empty TLimitation with the specified initial value.
TLimitation(java.lang.String name, java.lang.String nameXML)
          Creates a new empty TLimitation with the specified initial name and nameXML.
TLimitation(java.lang.String name, java.lang.String nameXML, int value)
          Creates a new empty TLimitation with the specified initial name, nameXML and value.
 
Method Summary
 void addAttribute(TAttribute attribute)
          Add an attribute to the limitation.
 TAttribute getAttribute(int index)
          Returs the limitation attribute in the specified index.
 TAttribute getAttribute(java.lang.String name)
          Returs the limitation attribute with the specified name.
 int getAttributeCount()
          Returns the number of attributes contained by the limitation
 java.util.List getAttributeList()
          Returs the list of attributes
 java.lang.String getName()
          Returns the limitation name.
 java.lang.String getNameXML()
          Returns the limitation nameXML.
 int getValue()
          Returns the limitation value.
 void removeAttribute(TAttribute attribute)
          Removes the specified attribute from the limitation.
 void setName(java.lang.String name)
          Sets the limitation name.
 void setNameXML(java.lang.String nameXML)
          Sets the limitation nameXML.
 void setValue(int value)
          Sets the limitation value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLimitation

public TLimitation()
Creates a new empty TLimitation with no initial name or value.


TLimitation

public TLimitation(java.lang.String name,
                   java.lang.String nameXML)
Creates a new empty TLimitation with the specified initial name and nameXML.

Parameters:
name - The specified initial name
nameXML - The specified initial nameXML

TLimitation

public TLimitation(int value)
Creates a new empty TLimitation with the specified initial value.

Parameters:
value - The specified initial value

TLimitation

public TLimitation(java.lang.String name,
                   java.lang.String nameXML,
                   int value)
Creates a new empty TLimitation with the specified initial name, nameXML and value.

Parameters:
name - The specified initial name
nameXML - The specified initial nameXML
value - The specified initial value
Method Detail

getName

public java.lang.String getName()
Returns the limitation name.

Returns:
The limitation name

setName

public void setName(java.lang.String name)
Sets the limitation name.

Parameters:
name - The limitation name to set

getNameXML

public java.lang.String getNameXML()
Returns the limitation nameXML.

Returns:
The limitation nameXML

setNameXML

public void setNameXML(java.lang.String nameXML)
Sets the limitation nameXML.

Parameters:
nameXML - The limitation nameXML to set

getValue

public int getValue()
Returns the limitation value.

Returns:
The limitation value

setValue

public void setValue(int value)
Sets the limitation value.

Parameters:
value - The limitation value to set

addAttribute

public void addAttribute(TAttribute attribute)
Add an attribute to the limitation.

Parameters:
attribute - The attribute to add

removeAttribute

public void removeAttribute(TAttribute attribute)
Removes the specified attribute from the limitation.

Parameters:
attribute - The attribute to delete

getAttribute

public TAttribute getAttribute(java.lang.String name)
Returs the limitation attribute with the specified name.

Parameters:
name - The specified attribute name
Returns:
The limitation attribute with the specified name. If the limitation does not contain any attribute with that name, returns null

getAttribute

public TAttribute getAttribute(int index)
Returs the limitation attribute in the specified index.

Parameters:
index - The specified attribute index
Returns:
The limitation attribute in the specified index

getAttributeCount

public int getAttributeCount()
Returns the number of attributes contained by the limitation

Returns:
The number of attributes

getAttributeList

public java.util.List getAttributeList()
Returs the list of attributes

Returns:
The list of attributes. If the limitation does not contain any attribute, returns null