org.haphazard.character
Class GeneralSkill

java.lang.Object
  extended byorg.haphazard.character.GeneralSkill

public class GeneralSkill
extends java.lang.Object

This class contains all general information about skills and attributes An attribute is a skill without a parent.


Constructor Summary
GeneralSkill(java.lang.String name)
          Creates a new instance of Skill
GeneralSkill(java.lang.String name, java.lang.String description)
          Creates a new instance of Skill
 
Method Summary
 boolean equals(java.lang.Object object)
          Checks if this object is equal to another object
 java.lang.String getDescription()
          Gets the description of the skill
 java.lang.String getName()
          Gets the name of the skill
 java.lang.String getParent()
          Gets the parent of this skill
 void setDescription(java.lang.String description)
          Sets the description for this skill
 void setName(java.lang.String name)
          Sets the name of the skill
 void setParent(java.lang.String parent)
          Sets the parent skill/attribute of this skill This is used for determining values for characters that need to roll for a skill that they are lacking.
 java.lang.String toString()
          Translates this object into a string representation
 java.lang.String toXML(int indent)
          Translates this object into an XML notation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeneralSkill

public GeneralSkill(java.lang.String name)
Creates a new instance of Skill

Parameters:
name - The name of the skill, must be unique

GeneralSkill

public GeneralSkill(java.lang.String name,
                    java.lang.String description)
Creates a new instance of Skill

Parameters:
name - The name of the skill, must be unique
description - The description of the skill
Method Detail

getName

public java.lang.String getName()
Gets the name of the skill

Returns:
The unique name of the skill

setName

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

Parameters:
name - The name to set

getDescription

public java.lang.String getDescription()
Gets the description of the skill

Returns:
The description of the skill

setDescription

public void setDescription(java.lang.String description)
Sets the description for this skill

Parameters:
description - The description to set

setParent

public void setParent(java.lang.String parent)
Sets the parent skill/attribute of this skill This is used for determining values for characters that need to roll for a skill that they are lacking.

Parameters:
parent - The parent of this skill

getParent

public java.lang.String getParent()
Gets the parent of this skill

Returns:
The parent of the skill (null if it's an attribute)

equals

public boolean equals(java.lang.Object object)
Checks if this object is equal to another object

Parameters:
object - The object to compare with
Returns:
True if equal

toXML

public java.lang.String toXML(int indent)
Translates this object into an XML notation

Parameters:
indent - The level of indentation to use
Returns:
The object in XML notation

toString

public java.lang.String toString()
Translates this object into a string representation

Returns:
This object in a String representation