public class MRL extends Object
Constructor and Description |
---|
MRL()
Constructs MRL object
|
MRL(List<String> urls)
Constructs MRL object with the specified URLs
|
MRL(String... urls)
Constructs MRL object with the specified URLs
|
MRL(String name,
String author)
Constructs MRL object with the specified
name and author |
Modifier and Type | Method and Description |
---|---|
void |
addURL(String... urls)
Adds the specified URLs to this locator
|
String |
getAuthor()
Returns the author of the media resource
|
String |
getCurrentResource()
Return the current URL.
|
String |
getName()
Returns a descriptive name of the media resource
|
String |
getNextResource(boolean roll)
Returns the next alternative URL of the media
|
String |
getResource(int index)
Returns the resource URL at the specified
index |
int |
getResourceCount()
Returns the number of URLs in this locator
|
void |
setAuthor(String author)
Sets the author of the media resource
|
void |
setName(String name)
Assigns a descriptive name for the media resource
|
String |
toString() |
public MRL()
public MRL(String name, String author)
name
and author
name
- the descriptive name of the media resourceauthor
- the author of the media resourcepublic MRL(String... urls)
urls
- URLs of the mediapublic void addURL(String... urls)
urls
- URLs of the mediapublic String getNextResource(boolean roll)
roll
- true
if an end-of-list should roll over to the first URLIndexOutOfBoundsException
- if end-of-list is reached and roll
is falsepublic String getCurrentResource()
getNextResource(boolean)
method callpublic int getResourceCount()
public String getResource(int index)
index
index
- the index of the required resource URLIndexOutOfBoundsException
- if the index is out of rangepublic String getAuthor()
public void setAuthor(String author)
author
- the author of the media resourcepublic String getName()
public void setName(String name)
name
- a descriptive name of the media resourceCopyright © 2009-2013. All Rights Reserved.