public final class Bo2ObjectTube extends java.lang.Object implements Bo2ObjectProvider
WPObject.ATTRIBUTE_FREQUENCY attributes).| Constructor and Description | 
|---|
| Bo2ObjectTube(java.lang.String name,
             java.util.List<WPObject> objects) | 
| Modifier and Type | Method and Description | 
|---|---|
| Bo2ObjectTube | clone()Create a deep copy of the object provider. | 
| java.util.List<WPObject> | getAllObjects()Obtain a list of all different  WPObjects which this
 object provider can return. | 
| java.lang.String | getName()Get the name of this object provider (if it represents one object this
 may be the name of the object). | 
| WPObject | getObject()Obtain one  WPObject, which may be the same one every time, or a
 different one from a random collection or sequence every time. | 
| static Bo2ObjectTube | load(java.io.File dir)Create a new  Bo2ObjectTubecontaining all supported custom
 objects from a specific directory. | 
| static Bo2ObjectTube | load(java.lang.String name,
    java.util.Collection<java.io.File> files)Create a new  Bo2ObjectTubewith a specific name from a list
 of specific custom object files. | 
| static Bo2ObjectTube | load(java.lang.String name,
    java.io.File dir)Create a new  Bo2ObjectTubewith a specific name, containing
 all supported custom objects from a specific directory. | 
| void | setSeed(long seed)Sets the seed of the PRNG, for object providers which use one. | 
public Bo2ObjectTube(java.lang.String name,
                     java.util.List<WPObject> objects)
public java.lang.String getName()
Bo2ObjectProvidergetName in interface Bo2ObjectProviderpublic void setSeed(long seed)
Bo2ObjectProvidersetSeed in interface Bo2ObjectProviderseed - The seed to set on the PRNG, if any.public WPObject getObject()
Bo2ObjectProviderWPObject, which may be the same one every time, or a
 different one from a random collection or sequence every time.getObject in interface Bo2ObjectProviderWPObject.public java.util.List<WPObject> getAllObjects()
Bo2ObjectProviderWPObjects which this
 object provider can return. This is an optional operation which may
 throw an UnsupportedOperationException if this object provider
 does not support it.getAllObjects in interface Bo2ObjectProviderpublic Bo2ObjectTube clone()
Bo2ObjectProviderclone in interface Bo2ObjectProviderclone in class java.lang.Objectpublic static Bo2ObjectTube load(java.io.File dir) throws java.io.IOException
Bo2ObjectTube containing all supported custom
 objects from a specific directory. The name of the
 Bo2ObjectTube will be set to the name of the directory.dir - The directory containing the objects to load.Bo2ObjectTube containing the supported objects
     from the specified directory.java.io.IOException - If there was an I/O error reading one of the files.public static Bo2ObjectTube load(java.lang.String name, java.io.File dir) throws java.io.IOException
Bo2ObjectTube with a specific name, containing
 all supported custom objects from a specific directory.name - The name of the new Bo2ObjectTube.dir - The directory containing the objects to load.Bo2ObjectTube containing the supported objects
     from the specified directory.java.io.IOException - If there was an I/O error reading one of the files.public static Bo2ObjectTube load(java.lang.String name, java.util.Collection<java.io.File> files) throws java.io.IOException
Bo2ObjectTube with a specific name from a list
 of specific custom object files.name - The name of the new Bo2ObjectTube.files - The list of files containing the objects to load.Bo2ObjectTube containing the custom objects
     from the specified file(s).java.io.IOException - If there was an I/O error reading one of the files.