net.sourceforge.pavlov.randommedia
Class MediaCache

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<E>
              extended by java.util.Stack<Object>
                  extended by net.sourceforge.pavlov.randommedia.MediaCache
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess
Direct Known Subclasses:
ImageCache, SoundList

public abstract class MediaCache
extends Stack<Object>

Loads and holds a bunch of audio files whose locations are specified relative to a fixed base URL.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
MediaCache(RandomURLProvider p, int mySize)
          Creates a new MediaCache instance.
 
Method Summary
 boolean add(Object obj)
          Describe add method here.
 void clearCache()
          Describe clearCache method here.
 Object getObject()
          Describe getObject method here.
 void manageCache()
          Describe manageCache method here.
 void startLoading(URL url)
          Describe startLoading method here.
 
Methods inherited from class java.util.Stack
empty, peek, pop, push, search
 
Methods inherited from class java.util.Vector
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

MediaCache

public MediaCache(RandomURLProvider p,
                  int mySize)
Creates a new MediaCache instance.

Parameters:
p - a RandomURLProvider value
mySize - an int value
Method Detail

startLoading

public void startLoading(URL url)
Describe startLoading method here.

Parameters:
url - an URL value

getObject

public Object getObject()
Describe getObject method here.

Returns:
an Object value

add

public boolean add(Object obj)
Describe add method here.

Specified by:
add in interface Collection<Object>
Specified by:
add in interface List<Object>
Overrides:
add in class Vector<Object>
Parameters:
obj - an Object value
Returns:
a boolean value

clearCache

public void clearCache()
Describe clearCache method here.


manageCache

public void manageCache()
Describe manageCache method here.