Class XSPFTracks
- java.lang.Object
-
- cz.martlin.xspf.playlist.base.XSPFNode
-
- cz.martlin.xspf.playlist.base.XSPFElement
-
- cz.martlin.xspf.playlist.base.XSPFCollection<XSPFTrack>
-
- cz.martlin.xspf.playlist.collections.XSPFTracks
-
public class XSPFTracks extends XSPFCollection<XSPFTrack>
An collection of theXSPFTracks.- Author:
- martin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class cz.martlin.xspf.playlist.base.XSPFElement
XSPFElement.XSPFCollectionFactory<E extends XSPFElement>
-
-
Constructor Summary
Constructors Constructor Description XSPFTracks(Element trackList)Creates instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XSPFTrackcreate(Element track)Creates theXSPFElementfor the given XML element.XSPFTrackcreateTrack()Creates (empty) track.XSPFTrackcreateTrack(URI location)Creates track with given location.XSPFTrackcreateTrack(URI location, String title)Creates track with given location and title.XSPFTrackcreateTrack(URI location, String title, int trackNum, java.time.Duration duration)Creates track with given location, title trackNum and duration.XSPFTrackcreateTrack(URI location, String creator, String album, String title, int trackNum, java.time.Duration duration)Creates track with given location, creator, album, title, trackNum and duration.protected StringelemName()Returns the element name of the children.XSPFTracktrack(int trackNum)Returns track having the given trackNum.XSPFTracktrack(String title)Returns track having the given title.-
Methods inherited from class cz.martlin.xspf.playlist.base.XSPFCollection
add, createNew, equals, hashCode, iterate, list, remove, size, toString
-
Methods inherited from class cz.martlin.xspf.playlist.base.XSPFElement
collection, collection, getCollection, getCollection, getDate, getDuration, getElement, getInt, getNode, getStr, getStr, getUri, getUri, getUriAttr, setCollection, setCollection, setDate, setDuration, setInt, setStr, setStr, setUri, setUri, setUriAttr
-
-
-
-
Constructor Detail
-
XSPFTracks
public XSPFTracks(Element trackList)
Creates instance.- Parameters:
trackList- an trackList element.
-
-
Method Detail
-
elemName
protected String elemName()
Description copied from class:XSPFCollectionReturns the element name of the children.- Specified by:
elemNamein classXSPFCollection<XSPFTrack>- Returns:
-
create
protected XSPFTrack create(Element track)
Description copied from class:XSPFCollectionCreates theXSPFElementfor the given XML element.- Specified by:
createin classXSPFCollection<XSPFTrack>- Returns:
-
createTrack
public XSPFTrack createTrack() throws XSPFException
Creates (empty) track.- Returns:
- Throws:
XSPFException
-
createTrack
public XSPFTrack createTrack(URI location) throws XSPFException
Creates track with given location.- Parameters:
location-- Returns:
- Throws:
XSPFException
-
createTrack
public XSPFTrack createTrack(URI location, String title) throws XSPFException
Creates track with given location and title.- Parameters:
location-title-- Returns:
- Throws:
XSPFException
-
createTrack
public XSPFTrack createTrack(URI location, String title, int trackNum, java.time.Duration duration) throws XSPFException
Creates track with given location, title trackNum and duration.- Parameters:
location-title-trackNum-duration-- Returns:
- Throws:
XSPFException
-
createTrack
public XSPFTrack createTrack(URI location, String creator, String album, String title, int trackNum, java.time.Duration duration) throws XSPFException
Creates track with given location, creator, album, title, trackNum and duration.- Parameters:
location-creator-album-title-trackNum-duration-- Returns:
- Throws:
XSPFException
-
track
public XSPFTrack track(int trackNum) throws XSPFException
Returns track having the given trackNum. Null if no such.- Parameters:
trackNum-- Returns:
- Throws:
XSPFException
-
track
public XSPFTrack track(String title) throws XSPFException
Returns track having the given title. Null if no such.- Parameters:
title-- Returns:
- Throws:
XSPFException
-
-