com.dt.iTunesController
Class ITTrackCollection

java.lang.Object
  extended by com.dt.iTunesController.ITTrackCollection

public class ITTrackCollection
extends java.lang.Object

Represents a collection of track objects. Note that collection indices are always 1-based. You can retrieve all the tracks defined for a playlist using ITPlaylist.getTracks(). You can retrieve the currently selected track or tracks using iTunes.getSelectedTracks().


Field Summary
protected  com.jacob.com.Dispatch object
           
 
Constructor Summary
ITTrackCollection(com.jacob.com.Dispatch d)
           
 
Method Summary
 int getCount()
          Returns the number of tracks in the collection.
 ITTrack getItem(int index)
          Returns an ITTrack object corresponding to the given index (1-based).
 ITTrack getItemByPersistentID(int highID, int lowID)
          Returns an ITTrack object with the specified persistent ID.
 ITTrack getItemByPlayOrder(int index)
          Returns an ITTrack object corresponding to the given index (1-based).
 ITTrack ItemByName(java.lang.String name)
          Returns an ITTrack object withthe specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

protected com.jacob.com.Dispatch object
Constructor Detail

ITTrackCollection

public ITTrackCollection(com.jacob.com.Dispatch d)
Method Detail

getCount

public int getCount()
Returns the number of tracks in the collection.

Returns:
Returns the number of tracks in the collection.

getItem

public ITTrack getItem(int index)
Returns an ITTrack object corresponding to the given index (1-based).

Parameters:
index - Index of the track to retrieve, must be less than or equal to ITTrackCollection.getCount().
Returns:
Returns an ITTrack object corresponding to the given index. Will be set to NULL if no track could be retrieved.

getItemByPlayOrder

public ITTrack getItemByPlayOrder(int index)
Returns an ITTrack object corresponding to the given index (1-based).

Parameters:
index - Index of the track to retrieve, must be less than or equal to ITTrackCollection.getCount().
Returns:
Returns an ITTrack object corresponding to the given index. Will be set to NULL if no track could be retrieved.

ItemByName

public ITTrack ItemByName(java.lang.String name)
Returns an ITTrack object withthe specified name.

Parameters:
name - The name of the track to retrieve.
Returns:
Returns an ITTrack object corresponding to the given index. Will be set to NULL if no track could be retrieved.

getItemByPersistentID

public ITTrack getItemByPersistentID(int highID,
                                     int lowID)
Returns an ITTrack object with the specified persistent ID. See the documentation on ITObject for more information on persistent IDs.

Parameters:
highID - The high 32 bits of the 64-bit persistent ID.
lowID - The low 32 bits of the 64-bit persistent ID.
Returns:
Returns an ITTrack object with the specified persistent ID. Will be set to NULL if no track could be retrieved.