aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/sound/midi/Track.java
diff options
context:
space:
mode:
authorgandalf <gandalf@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-09 13:41:52 +0000
committergandalf <gandalf@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-09 13:41:52 +0000
commit9cf4b685f6d9ff5a5d07999a6b46443ac6269fea (patch)
treebd7953038bd9018b469d5a2759e9fd9af02ce7f1 /libjava/classpath/javax/sound/midi/Track.java
parent720912581f984fc206614e0711a9538090890eee (diff)
Update to Classpath 0.99.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/CLASSPATH@185138 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/sound/midi/Track.java')
-rw-r--r--libjava/classpath/javax/sound/midi/Track.java35
1 files changed, 17 insertions, 18 deletions
diff --git a/libjava/classpath/javax/sound/midi/Track.java b/libjava/classpath/javax/sound/midi/Track.java
index eed5d4c2de0..550d2e1c4ab 100644
--- a/libjava/classpath/javax/sound/midi/Track.java
+++ b/libjava/classpath/javax/sound/midi/Track.java
@@ -42,9 +42,9 @@ import java.util.HashSet;
import java.util.Vector;
/**
- * A Track contains a list of timecoded MIDI events for processing
+ * A Track contains a list of timecoded MIDI events for processing
* by a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,10 +52,10 @@ import java.util.Vector;
public class Track
{
/**
- * The list of MidiEvents for this track.
+ * The list of MidiEvents for this track.
*/
Vector events = new Vector();
-
+
// A HashSet to speed processing
private HashSet eventSet = new HashSet();
@@ -68,7 +68,7 @@ public class Track
* Add a new event to this track. Specific events may only be added once.
* The event will be inserted into the appropriate spot in the event list
* based on its timecode.
- *
+ *
* @param event the event to add
* @return true if the event was added, false otherwise
*/
@@ -78,7 +78,7 @@ public class Track
{
if (eventSet.contains(event))
return false;
-
+
eventSet.add(event);
long targetTick = event.getTick();
@@ -89,10 +89,10 @@ public class Track
return true;
}
}
-
+
/**
* Remove an event from this track.
- *
+ *
* @param event the event to remove
* @return true if the event was removed, false otherwise
*/
@@ -102,21 +102,21 @@ public class Track
{
if (! eventSet.remove(event))
return false;
-
+
int i = events.indexOf(event);
if (i >= 0)
{
events.remove(i);
return true;
}
-
+
throw new InternalError("event in set but not list");
}
}
-
+
/**
* Get an event idetified by its order index
- *
+ *
* @param index the location of the event to get
* @return the event at index
* @throws ArrayIndexOutOfBoundsException if index is out of bounds
@@ -131,16 +131,16 @@ public class Track
}
catch (IndexOutOfBoundsException e)
{
- throw (ArrayIndexOutOfBoundsException)
+ throw (ArrayIndexOutOfBoundsException)
new ArrayIndexOutOfBoundsException().initCause(e);
}
}
}
-
-
+
+
/**
* Get the number events in this track.
- *
+ *
* @return the number of events in this track
*/
public int size()
@@ -150,7 +150,7 @@ public class Track
/**
* Get the length of the track in MIDI ticks.
- *
+ *
* @return the length of the track in MIDI ticks
*/
public long ticks()
@@ -162,4 +162,3 @@ public class Track
}
}
}
-