Lizzy v1.1.1

christophedelory.playlist
Class AbstractPlaylistComponent

java.lang.Object
  extended by christophedelory.playlist.AbstractPlaylistComponent
Direct Known Subclasses:
AbstractTimeContainer, Media

public abstract class AbstractPlaylistComponent
extends Object

The base component of a playlist.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
AbstractPlaylistComponent()
           
 
Method Summary
abstract  void acceptDown(PlaylistVisitor visitor)
          Accepts the specified playlist visitor.
 void acceptUp(PlaylistVisitor visitor)
          Accepts the specified playlist visitor.
 AbstractTimeContainer getParent()
          Returns the parent container of this playlist component, if any.
 int getRepeatCount()
          Returns the number of iterations of this playlist component.
(package private)  void setParent(AbstractTimeContainer parent)
          Initializes the parent container of this playlist component.
 void setRepeatCount(int repeatCount)
          Initializes the number of iterations of this playlist component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPlaylistComponent

public AbstractPlaylistComponent()
Method Detail

setParent

void setParent(AbstractTimeContainer parent)
Initializes the parent container of this playlist component.

Parameters:
parent - a container. May be null.
See Also:
getParent()

getParent

public AbstractTimeContainer getParent()
Returns the parent container of this playlist component, if any.

Returns:
the parent container. May be null if this component hasn't been added to a playlist yet.

getRepeatCount

public int getRepeatCount()
Returns the number of iterations of this playlist component. If negative, represents an indefinite repeat count. Zero (0) means never played. The default value is one (1).

Returns:
the element's repeat count.
See Also:
setRepeatCount(int)

setRepeatCount

public void setRepeatCount(int repeatCount)
Initializes the number of iterations of this playlist component.

Parameters:
repeatCount - a repeat count.
See Also:
getRepeatCount()

acceptDown

public abstract void acceptDown(PlaylistVisitor visitor)
                         throws Exception
Accepts the specified playlist visitor.

Parameters:
visitor - a visitor. Shall not be null.
Throws:
NullPointerException - if visitor is null.
Exception - if any error occurs during the visit.

acceptUp

public void acceptUp(PlaylistVisitor visitor)
              throws Exception
Accepts the specified playlist visitor.

Parameters:
visitor - a visitor. Shall not be null.
Throws:
NullPointerException - if visitor is null.
Exception - if any error occurs during the visit.

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.