jreceiver.common.rec.util
Class MenuRec

java.lang.Object
  |
  +--jreceiver.common.rec.BaseRec
        |
        +--jreceiver.common.rec.util.MenuRec
All Implemented Interfaces:
Hashable, Menu

public final class MenuRec
extends BaseRec
implements Menu

Bean to represent a single menu item, with associated tune count and index.

For use in displaying menus of artists, albums, genres and titles.

Version:
$Revision: 1.2 $ $Date: 2002/12/29 00:44:06 $
Author:
Reed Esau

Field Summary
protected  int index
          the offset of the menu item
protected  java.lang.String menu_text
          the text of the menu item
protected  int tune_count
          the number of tunes associated with the menu item
 
Fields inherited from interface jreceiver.common.rec.util.Menu
HKEY_INDEX, HKEY_MENU_TEXT, HKEY_TUNE_COUNT
 
Constructor Summary
MenuRec()
           
MenuRec(java.util.Hashtable hash)
          ctor - construct from a hashtable, usually retrieved via XML-RPC
MenuRec(java.lang.String menu_text, int tune_count, int index)
           
 
Method Summary
 int getIndex()
           
 java.lang.String getMenuText()
           
 int getTuneCount()
           
static java.util.Vector reconstitute(java.util.Vector vector)
          Reconstitute each MenuRec object that appears as a hash in the list.
 void setIndex(int index)
           
 void setMenuText(java.lang.String menu_text)
           
 void setTuneCount(int tune_count)
           
 java.util.Hashtable toHash()
          Store the object as a hash suitable for transport over an XML-RPC connection or similar.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class jreceiver.common.rec.BaseRec
dissolve, dissolveMap, find, find, find, find
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

menu_text

protected java.lang.String menu_text
the text of the menu item

tune_count

protected int tune_count
the number of tunes associated with the menu item

index

protected int index
the offset of the menu item
Constructor Detail

MenuRec

public MenuRec()

MenuRec

public MenuRec(java.lang.String menu_text,
               int tune_count,
               int index)

MenuRec

public MenuRec(java.util.Hashtable hash)
ctor - construct from a hashtable, usually retrieved via XML-RPC
Parameters:
hash -  
Method Detail

getMenuText

public java.lang.String getMenuText()
Specified by:
getMenuText in interface Menu

setMenuText

public void setMenuText(java.lang.String menu_text)
Specified by:
setMenuText in interface Menu

getTuneCount

public int getTuneCount()
Specified by:
getTuneCount in interface Menu

setTuneCount

public void setTuneCount(int tune_count)
Specified by:
setTuneCount in interface Menu

getIndex

public int getIndex()
Specified by:
getIndex in interface Menu

setIndex

public void setIndex(int index)
Specified by:
setIndex in interface Menu

toString

public java.lang.String toString()
Returns a string representation of the object.
Specified by:
toString in interface Hashable
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

toHash

public java.util.Hashtable toHash()
Store the object as a hash suitable for transport over an XML-RPC connection or similar.

Use MenuRec(Hashtable) to transform the data back into an object of this type.

Specified by:
toHash in interface Hashable
Returns:
 

reconstitute

public static java.util.Vector reconstitute(java.util.Vector vector)
Reconstitute each MenuRec object that appears as a hash in the list.
Parameters:
vector -  
Returns:
 


Copyright © 2001-2002 Reed Esau, All Rights Reserved.