org.jfugue
Class PatternTool

java.lang.Object
  extended by org.jfugue.ParserListenerAdapter
      extended by org.jfugue.PatternTool
All Implemented Interfaces:
java.util.EventListener, ParserListener
Direct Known Subclasses:
DurationPatternTool, GetPatternForVoiceTool

public abstract class PatternTool
extends ParserListenerAdapter

Abstract class represting a tool that works on patterns to measure or assess something about the pattern. This feature is covered in detail in "The Complete Guide to JFugue"

Version:
2.0
Author:
David Koelle
See Also:
Pattern

Constructor Summary
PatternTool()
           
 
Method Summary
 java.lang.Object execute(Pattern pattern)
          Runs the pattern tool and returns the result
 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
channelPressureEvent, controllerEvent, instrumentEvent, keySignatureEvent, layerEvent, measureEvent, noteEvent, parallelNoteEvent, pitchBendEvent, polyphonicPressureEvent, sequentialNoteEvent, tempoEvent, timeEvent, 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 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