|
|||||||||
| Home >> All >> org >> metacosm >> framework >> [ perceptions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.metacosm.framework.perceptions
Class MediaPool

java.lang.Objectorg.metacosm.framework.perceptions.MediaPool
- All Implemented Interfaces:
- org.metacosm.framework.persistence.Persistent, java.io.Serializable
- public final class MediaPool
- extends java.lang.Object
- implements org.metacosm.framework.persistence.Persistent
- extends java.lang.Object
This class gets all different media. Access a Medium only through this class. It is a Singleton OOD pattern.
| Field Summary | |
protected static MediaPool |
media_pool
The unique instance of this class. |
private java.util.List |
mediaCol
A collection of class Medium |
private int |
mediaNumber
The number of Mediums in this pool |
| Constructor Summary | |
private |
MediaPool()
|
| Method Summary | |
private void |
addMedium(Medium medium)
|
java.util.Collection |
getAll()
Gets all media in a Collection. |
static MediaPool |
getInstance()
|
Sound |
getSound()
A specialized method to get the 'Sound' medium |
VisibleLight |
getVisibleLight()
A specialized method to get the 'Visible light' medium. |
void |
load(java.io.InputStream is)
Loads from the stream. |
void |
save(java.io.OutputStream os)
Saves on the stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
media_pool
protected static MediaPool media_pool
- The unique instance of this class.
mediaCol
private java.util.List mediaCol
- A collection of class Medium
mediaNumber
private int mediaNumber
- The number of Mediums in this pool
| Constructor Detail |
MediaPool
private MediaPool()
| Method Detail |
getInstance
public static MediaPool getInstance()
getAll
public java.util.Collection getAll()
- Gets all media in a Collection.
getVisibleLight
public VisibleLight getVisibleLight()
- A specialized method to get the 'Visible light' medium.
getSound
public Sound getSound()
- A specialized method to get the 'Sound' medium
addMedium
private void addMedium(Medium medium)
load
public void load(java.io.InputStream is) throws java.io.IOException
- Loads from the stream.
- Specified by:
loadin interfaceorg.metacosm.framework.persistence.Persistent
save
public void save(java.io.OutputStream os) throws java.io.IOException
- Saves on the stream.
- Specified by:
savein interfaceorg.metacosm.framework.persistence.Persistent
|
|||||||||
| Home >> All >> org >> metacosm >> framework >> [ perceptions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.metacosm.framework.perceptions.MediaPool