org.jfugue
Class PatternTool

java.lang.Object
  |
  +--org.jfugue.ParserListenerAdapter
        |
        +--org.jfugue.PatternTool
All Implemented Interfaces:
ParserListener
Direct Known Subclasses:
DurationPatternTool

public abstract class PatternTool
extends ParserListenerAdapter


Constructor Summary
PatternTool()
           
 
Method Summary
 java.lang.Object execute(Pattern pattern)
          Runs the pattern tool and returns the result
abstract  java.lang.String getDescription()
          Indicates what this PatternTool does.
abstract  java.lang.Object getResult()
          Returns the result of the pattern tool after it has been executed on a pattern.
abstract  void reset()
          Resets the variables in a subclass of PatternTool.
 
Methods inherited from class org.jfugue.ParserListenerAdapter
controllerEvent, instrumentEvent, noteEvent, parallelNoteEvent, sequentialNoteEvent, tempoEvent, voiceEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternTool

public PatternTool()
Method Detail

reset

public abstract void reset()
Resets the variables in a subclass of PatternTool. This method is called every time this class's execute() method is called.

getResult

public abstract java.lang.Object getResult()
Returns the result of the pattern tool after it has been executed on a pattern.
Returns:
the result of executing this pattern tool on a pattern

getDescription

public abstract java.lang.String getDescription()
Indicates what this PatternTool does.
Returns:
A String giving a quick description of this tool

execute

public java.lang.Object execute(Pattern pattern)
Runs the pattern tool and returns the result
Parameters:
pattern - the pattern on which to use this tool
Returns:
the result of performing this pattern tool on the given pattern