< prev index next >

src/java.desktop/share/classes/javax/sound/midi/Sequence.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 264,291 **** * otherwise {@code false} * @see #createTrack * @see #getTracks */ public boolean deleteTrack(Track track) { - - synchronized(tracks) { - return tracks.removeElement(track); } - } /** * Obtains an array containing all the tracks in this sequence. If the * sequence contains no tracks, an array of length 0 is returned. * * @return the array of tracks * @see #createTrack * @see #deleteTrack */ public Track[] getTracks() { ! ! return tracks.toArray(new Track[tracks.size()]); } /** * Obtains the duration of this sequence, expressed in microseconds. * --- 264,286 ---- * otherwise {@code false} * @see #createTrack * @see #getTracks */ public boolean deleteTrack(Track track) { return tracks.removeElement(track); } /** * Obtains an array containing all the tracks in this sequence. If the * sequence contains no tracks, an array of length 0 is returned. * * @return the array of tracks * @see #createTrack * @see #deleteTrack */ public Track[] getTracks() { ! return tracks.toArray(new Track[0]); } /** * Obtains the duration of this sequence, expressed in microseconds. *
< prev index next >