com.tffenterprises.music.tag.id3v2.frame
Class KeyedContainer
java.lang.Object
com.tffenterprises.music.tag.id3v2.Frame
com.tffenterprises.music.tag.id3v2.frame.Container
com.tffenterprises.music.tag.id3v2.frame.KeyedContainer
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class KeyedContainer
- extends Container
- implements java.io.Serializable, java.lang.Cloneable
Container is a fake frame that holds multiple frames of the same type
in ID3v2's frame table. Many types of frames can have multiple occurrences
in a single ID3v2 tag, but they generally have a sub-key by which they
can be uniquely identified. The classes that represent such frames
must implement the
com.tffenterprises.music.tag.id3v2.frame.KeyedFrame
interface.
- Version:
- 1.0d1 $Date: 2003/11/09 21:28:04 $
- Author:
- Guillaume Lessard
- See Also:
- Serialized Form
Field Summary |
private java.util.Hashtable |
frameTable
A hashtable to contain the contained frames. |
Constructor Summary |
KeyedContainer()
Public default constructor. |
KeyedContainer(java.lang.String id)
Construct a KeyedContainer for the frame id passed as a parameter. |
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.Container |
clone, equals, getChecksum, getFormatFlags, getFrameID, getHeader, getRawData, getStatusFlags, hashCode, isChanged, isOfRepeatableType, setChanged, setFormatFlags, setRawData, setStatusFlags, toByteArray, toString, updateChecksum, writeTo |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
frameTable
private java.util.Hashtable frameTable
- A hashtable to contain the contained frames.
KeyedContainer
public KeyedContainer()
- Public default constructor.
KeyedContainer
public KeyedContainer(java.lang.String id)
throws java.lang.IllegalArgumentException
- Construct a KeyedContainer for the frame id passed as a parameter.
- Parameters:
id
- the frame id of the frames to be contained in this Container.
- Throws:
java.lang.IllegalArgumentException
- This is exception is thrown when
the parameter is unacceptable or
unusable.
addFrame
public Frame addFrame(Frame frame)
throws java.lang.IllegalArgumentException
- Specified by:
addFrame
in class Container
- Throws:
java.lang.IllegalArgumentException
getFrame
public Frame getFrame(java.lang.String description)
removeFrame
public Frame removeFrame(java.lang.String description)
removeFrame
public Frame removeFrame(Frame frame)
throws java.lang.IllegalArgumentException
- Specified by:
removeFrame
in class Container
- Throws:
java.lang.IllegalArgumentException
frames
public java.util.Enumeration frames()
- Specified by:
frames
in class Container
descriptions
public java.util.Enumeration descriptions()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in class Container
size
public int size()
- Specified by:
size
in class Container
contains
public boolean contains(Frame frame)
- Specified by:
contains
in class Container
containsDescription
public boolean containsDescription(java.lang.String description)