edu.uiuc.cs397rhc.sound
Class NegationCondition

java.lang.Object
  extended by edu.uiuc.cs397rhc.sound.NegationCondition
All Implemented Interfaces:
MidiCondition

public class NegationCondition
extends java.lang.Object
implements MidiCondition

NegationCondition is a simple way of negating another MidiCondition.

Author:
Pedro DeRose

Constructor Summary
NegationCondition(MidiCondition condition)
          Constructs a new NegationCondition that negates the given MidiCondition.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getPrettyString()
          Returns a pretty, printable representation of this condition.
 boolean isSatisfiedBy(javax.sound.midi.MidiMessage msg, long time)
          Whether the condition is satisfied by the given MidiMessage and timestamp.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NegationCondition

public NegationCondition(MidiCondition condition)
Constructs a new NegationCondition that negates the given MidiCondition.

Parameters:
condition - the condition to be negated
Method Detail

isSatisfiedBy

public boolean isSatisfiedBy(javax.sound.midi.MidiMessage msg,
                             long time)
Description copied from interface: MidiCondition
Whether the condition is satisfied by the given MidiMessage and timestamp.

Specified by:
isSatisfiedBy in interface MidiCondition
Parameters:
msg - the message being checked
time - the timestamp of the message
Returns:
true if satisfied, false otherwise.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getPrettyString

public java.lang.String getPrettyString()
Description copied from interface: MidiCondition
Returns a pretty, printable representation of this condition. This will be used to recursively print out complex conditions.

Specified by:
getPrettyString in interface MidiCondition
Returns:
a pretty, printable representation of this condition

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object