com.tffenterprises.music.tag.id3v2.frame
Interface DateFrame

All Known Implementing Classes:
YearFrame

public interface DateFrame

This interface defines methods that are and/or will be useful for frames that represent dates and timestamps. Such frames can contain both date ranges and lists of non-contiguous dates.

Version:
1.0d1 $Date: 2002/10/11 00:57:30 $
Author:
Guillaume Lessard

Method Summary
 void addDate(java.util.Calendar c)
          Adds a single date to the DateFrame.
 void addDate(java.util.Date d)
          Adds a single date to the DateFrame.
 void addDateRange(java.util.Calendar begin, java.util.Calendar end)
          Adds a single range of dates to the DateFrame.
 void clearDate()
          Clears all the dates from the DateFrame.
 java.util.Calendar getDate()
          Get the first date for this frame.
 java.util.Enumeration getDates()
          Get all dates for this frame.
 boolean isSet()
          Whether this DateFrame has valid data.
 void setDate(java.util.Calendar c)
          Sets the DateFrame to a single date.
 void setDate(java.util.Date d)
          Sets the DateFrame to a single date.
 void setDateRange(java.util.Calendar begin, java.util.Calendar end)
          Sets the DateFrame to a single date.
 

Method Detail

clearDate

void clearDate()
Clears all the dates from the DateFrame.


isSet

boolean isSet()
Whether this DateFrame has valid data.

Returns:
true if the date has been set for this frame.

addDate

void addDate(java.util.Calendar c)
Adds a single date to the DateFrame.

Parameters:
c - the date to add to the DateFrame.

addDate

void addDate(java.util.Date d)
Adds a single date to the DateFrame.

Parameters:
d - the date to add to the DateFrame.

addDateRange

void addDateRange(java.util.Calendar begin,
                  java.util.Calendar end)
Adds a single range of dates to the DateFrame.

Parameters:
begin - the starting date of the range of dates.
end - the ending date of the range of dates.

setDate

void setDate(java.util.Calendar c)
Sets the DateFrame to a single date. This is equivalent to calling clearDate() followed by addDate().

Parameters:
c - the date to set the DateFrame to.

setDate

void setDate(java.util.Date d)
Sets the DateFrame to a single date. This is equivalent to calling clearDate() followed by addDate().

Parameters:
d - the date to set the DateFrame to.

setDateRange

void setDateRange(java.util.Calendar begin,
                  java.util.Calendar end)
Sets the DateFrame to a single date. This is equivalent to calling clearDate() followed by addDate().

Parameters:
begin - the starting date of the range of dates.
end - the ending date of the range of dates.

getDate

java.util.Calendar getDate()
Get the first date for this frame. This returns a clone of the object held internally.

Returns:
the first date for this frame.

getDates

java.util.Enumeration getDates()
Get all dates for this frame. The dates will be returned as Calendar objects If there is a range of dates in the list, it will be returned as a Vector (of length 2) of Calendar objects.

Returns:
an enumeration of all dates for this frame.