|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.beadsproject.beads.data.SampleManager
public class SampleManager
SampleManager provides a static repository for Sample
data and provides methods to organise samples into groups.
Constructor Summary | |
---|---|
SampleManager()
|
Method Summary | |
---|---|
static void |
destroyGroup(java.lang.String groupName)
Removes the specified group, and removes all of the samples found in the group from the sample repository. |
static Sample |
fromGroup(java.lang.String groupName,
int index)
Gets the Sample at the specified index from the specified group. |
static java.util.ArrayList<Sample> |
getGroup(java.lang.String groupName)
Gets the specified group in the form ArrayList<Sample>. |
static java.util.List<java.lang.String> |
getSampleNameList()
Returns an ArrayList containing all of the Sample names. |
static void |
group(java.lang.String groupName,
Sample[] sampleList)
Generates a new group with the given group name and list of Samples to be added to the group. |
static void |
group(java.lang.String groupName,
java.lang.String folderName)
Generates a new group with the given group name and a string that specifies where to load samples to be added to the group. |
static void |
group(java.lang.String groupName,
java.lang.String[] fileNameList)
Generates a new group with the given group name and a list of file names to be added to the group. |
static void |
printSampleList()
Prints a list of all Sample s to System.out. |
static Sample |
randomFromGroup(java.lang.String groupName)
Gets a random sample from the specified group. |
static void |
removeGroup(java.lang.String groupName)
Removes the specified group, without removing the samples. |
static void |
removeSample(Sample sample)
Removes the Sample . |
static void |
removeSample(java.lang.String sampleName)
Removes the named Sample . |
static Sample |
sample(java.lang.String fn)
Returns a new Sample from the given filename. |
static Sample |
sample(java.lang.String ref,
java.lang.String fn)
Like sample(String) but with the option to specify the name with which this Sample is indexed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SampleManager()
Method Detail |
---|
public static Sample sample(java.lang.String fn)
fn
- the file path.
public static Sample sample(java.lang.String ref, java.lang.String fn)
sample(String)
but with the option to specify the name with which this Sample
is indexed.
ref
- the name with which to index this Sample.fn
- the file path.
public static void group(java.lang.String groupName, Sample[] sampleList)
groupName
- the group name.sampleList
- the sample list.public static void group(java.lang.String groupName, java.lang.String folderName)
groupName
- the group name.folderName
- the folder address (URL or file path).public static void group(java.lang.String groupName, java.lang.String[] fileNameList)
groupName
- the group name.fileNameList
- the file name list.public static java.util.ArrayList<Sample> getGroup(java.lang.String groupName)
groupName
- the group name.
public static Sample randomFromGroup(java.lang.String groupName)
groupName
- the group.
public static Sample fromGroup(java.lang.String groupName, int index)
groupName
- the group name.index
- the index.
public static void removeSample(java.lang.String sampleName)
Sample
.
sampleName
- the sample name.public static void removeSample(Sample sample)
Sample
.
sample
- the Sample.public static void removeGroup(java.lang.String groupName)
groupName
- the group name.public static void destroyGroup(java.lang.String groupName)
groupName
- the group name.public static void printSampleList()
Sample
s to System.out.
public static java.util.List<java.lang.String> getSampleNameList()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |