Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.huguesjohnson.tiamat
Class Skill

    java.lang.Object
      com.huguesjohnson.tiamat.NamedObject
          com.huguesjohnson.tiamat.Skill

All Implemented Interfaces:
  Storable

    public class Skill

extends NamedObject

Skill - represents a skill for a character, modifies an a players attribute or ability to use an item.

Author:
  Hugues Johnson

Constructor Summary
`Skill(java.lang.String name, java.lang.String description)` Creates a new Skill with no targets.
`Skill(java.lang.String name, java.lang.String description, Target[] targets)` Creates a new Skill.

Method Summary
`void` | `addTarget(Target target)` Adds a Target to the collection of Targets.
`Target` | `getTarget(int index)` Returns the Target at the specified index, null if index out of range.
`int` | `getTargetCount()` Returns the number of targets for this Skill.
`Target[]` | `getTargets()` Returns the Targets for this Skill.
`void` | `setTarget(int index, Target target)` Sets the Target at the specified index.
`void` | `setTargets(Target[] targets)` Sets the Targets for this Skill.
`java.lang.String` | `toString()` Returns a string representation of the object.

Methods inherited from class com.huguesjohnson.tiamat.NamedObject
`getDescription, getName, onDeserialize, setDescription, setName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Skill

    public Skill(java.lang.String name,
                 java.lang.String description)

  Creates a new Skill with no targets.

  Parameters:
    `name` - The name of the Skill.
    `description` - The description of the Skill

### Skill

    public Skill(java.lang.String name,
                 java.lang.String description,
                 Target[] targets)

  Creates a new Skill.

  Parameters:
    `name` - The name of the Skill.
    `description` - The description of the Skill
    `targets` - The Targets for this Skill.

Method Detail

### setTargets

    public void setTargets(Target[] targets)

  Sets the Targets for this Skill.

  Parameters:
    `targets` - The new Targets for this Skill.

### getTargets

    public Target[] getTargets()

  Returns the Targets for this Skill.

  Returns:
    The Targets for this Skill.

### setTarget

    public void setTarget(int index,
                          Target target)

  Sets the Target at the specified index.

  Parameters:
    `index` - The index to set.
    `target` - The Target to set.

### getTarget

    public Target getTarget(int index)

  Returns the Target at the specified index, null if index out of range.

  Parameters:
    `index` - The index of the Target to retrieve.
  Returns:
    The Target at the specified index, null if index out of range.

### toString

    public java.lang.String toString()

  Returns a string representation of the object.

  Overrides:
    `toString` in class `NamedObject`
  Returns:
    A string representation of the object.

### getTargetCount

    public int getTargetCount()

  Returns the number of targets for this Skill.

  Returns:
    The number of targets for this Skill.

### addTarget

    public void addTarget(Target target)

  Adds a Target to the collection of Targets.

  Parameters:
    `target` - The Target to add.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hugues Johnson