agentland.device.intelliCD.jukebox
Class SongList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--agentland.device.intelliCD.SongContainer
                          |
                          +--agentland.device.intelliCD.jukebox.SongList
All Implemented Interfaces:
Cloneable, Collection, List, Serializable, SongContainerElement

public class SongList
extends SongContainer

A SongList is a version of the SongContainer which allows for shuffling and flattening of the container tree.

See Also:
Serializable, Serialized Form

Fields inherited from class agentland.device.intelliCD.SongContainer
author, id, parent, title
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SongList()
           
SongList(SongContainer sc)
           
 
Method Summary
 boolean flatten(SongContainerElement el, boolean recursive)
          if el==null, the given list should get flattened, if not look for the element with the right id
 List getNextSong()
           
 boolean scramble(SongContainerElement el, boolean recursive)
          if el==null, this list should get scrambled, if not looke for the element with the right id
 void set(int i, SongContainerElement el)
          Adds an element at the given index.
 agentland.device.intelliCD.jukebox.SongList.SubListIterator subListIterator()
           
 
Methods inherited from class agentland.device.intelliCD.SongContainer
add, add, addFromContainer, copyParent, copyParentTree, copySubtree, equals, getAuthor, getElement, getID, getName, getParent, getSCE, getSongsRecursive, getTitle, hashCode, iconName, init, lightweightCopy, lookup, lookupContainer, lookupContainer, lookupSong, printWithPrefix, remove, setAuthor, setID, setParent, setTitle, shallowCopy, toString
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, 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

SongList

public SongList()

SongList

public SongList(SongContainer sc)
Method Detail

set

public void set(int i,
                SongContainerElement el)
Adds an element at the given index. Since we want sublists to also be SongLists, coerces any SongContainer into a SongList.
Overrides:
set in class SongContainer
Following copied from class: agentland.device.intelliCD.SongContainer
See Also:
Vector.set(int, java.lang.Object)

scramble

public boolean scramble(SongContainerElement el,
                        boolean recursive)
if el==null, this list should get scrambled, if not looke for the element with the right id

flatten

public boolean flatten(SongContainerElement el,
                       boolean recursive)
if el==null, the given list should get flattened, if not look for the element with the right id

getNextSong

public List getNextSong()

subListIterator

public agentland.device.intelliCD.jukebox.SongList.SubListIterator subListIterator()