org.farng.mp3
Class AbstractMP3Fragment

java.lang.Object
  extended byorg.farng.mp3.AbstractMP3FileItem
      extended byorg.farng.mp3.AbstractMP3Fragment
Direct Known Subclasses:
AbstractID3v2Frame, Lyrics3v2Field

public abstract class AbstractMP3Fragment
extends AbstractMP3FileItem

This class represents parts of tags. It contains methods that they all use use. ID3v2 tags have frames. Lyrics3 tags have fields. ID3v1 tags do not have parts. It also contains thier header while the body contains the actual fragments.

Version:
$Revision: 1.2 $
Author:
Eric Farng

Constructor Summary
protected AbstractMP3Fragment()
          Creates a new AbstractMP3Fragment object.
protected AbstractMP3Fragment(AbstractMP3Fragment copyObject)
          Creates a new AbstractMP3Fragment object.
protected AbstractMP3Fragment(AbstractMP3FragmentBody body)
          Creates a new AbstractMP3Fragment object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if this object and its body equals the argument and its body.
 AbstractMP3FragmentBody getBody()
          Returns the body object for this fragment.
 boolean isSubsetOf(java.lang.Object object)
          Returns true if this object and it's body is a subset of the argument.
 void setBody(AbstractMP3FragmentBody body)
          Sets the body object for this fragment.
 
Methods inherited from class org.farng.mp3.AbstractMP3FileItem
getIdentifier, getSize, read, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMP3Fragment

protected AbstractMP3Fragment()
Creates a new AbstractMP3Fragment object.


AbstractMP3Fragment

protected AbstractMP3Fragment(AbstractMP3FragmentBody body)
Creates a new AbstractMP3Fragment object.


AbstractMP3Fragment

protected AbstractMP3Fragment(AbstractMP3Fragment copyObject)
Creates a new AbstractMP3Fragment object.

Method Detail

setBody

public void setBody(AbstractMP3FragmentBody body)
Sets the body object for this fragment. The body object contains the actual information for the fragment.

Parameters:
body - the body object

getBody

public AbstractMP3FragmentBody getBody()
Returns the body object for this fragment. The body object contains the actual information for the fragment.

Returns:
the body object

isSubsetOf

public boolean isSubsetOf(java.lang.Object object)
Returns true if this object and it's body is a subset of the argument. This object is a subset if the argument is the same class.

Overrides:
isSubsetOf in class AbstractMP3FileItem
Parameters:
object - object to determine if subset of
Returns:
true if this object and it's body is a subset of the argument.

equals

public boolean equals(java.lang.Object obj)
Returns true if this object and its body equals the argument and its body. this object is equal if and only if they are the same class and have the same getIdentifier id string.

Overrides:
equals in class AbstractMP3FileItem
Parameters:
obj - object to determine equality of
Returns:
true if this object and its body equals the argument and its body.


Copyright (c) 2004 Eric Farng