jreceiver.common.rec
Class BaseRec

java.lang.Object
  |
  +--jreceiver.common.rec.BaseRec
Direct Known Subclasses:
AlbumRec, ArtistRec, CommandRec, CommentRec, ComposerRec, DeviceBindingKey, DeviceBindingRec, DeviceRec, DriverBindingKey, DriverBindingRec, DriverRec, DsettingRec, FilterableRec, FolderRec, GenreRec, HandlerRec, MenuRec, MethodKey, MethodRec, RoleAuthKey, RoleAuthRec, RoleRec, RootKey, RootRec, SignalKey, SignalRec, SiteRec, SourceRec, TranscoderRec, TuneQueryRec, UserRec

public abstract class BaseRec
extends java.lang.Object

Bean that serves as a common base class for all 'Rec' classes.

Version:
$Revision: 1.3 $ $Date: 2002/09/24 21:09:53 $
Author:
Reed Esau

Constructor Summary
BaseRec()
           
 
Method Summary
static java.util.Vector dissolve(java.util.Vector vector)
          Hash each hashable object that appears in the vector
static java.util.Hashtable dissolveMap(java.util.Hashtable map)
          Hash each hashable object that appears in the map
static Rec find(java.util.List list, int key_to_find)
          given a list of records with int keys, locate the first one whose key matches key_to_find.
static Rec find(java.util.List list, Key key_to_find)
          given a list of records with Key-derived keys, locate the first one whose key matches key_to_find.
static Rec find(java.util.List list, java.lang.Number key_to_find)
          given a list of records with Number-derived keys, locate the first one whose key matches key_to_find.
static Rec find(java.util.List list, java.lang.String key_to_find)
          given a list of records with String-derived keys, locate the first one whose key matches key_to_find.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRec

public BaseRec()
Method Detail

dissolve

public static java.util.Vector dissolve(java.util.Vector vector)
Hash each hashable object that appears in the vector

Requires that each object be derived from Hashable. It will throw a ClassCastException if you give it a 'key' that is derived from Number or String.

If you pass it a vector containing Number or String-derived keys, it will throw a ClassCastException.


dissolveMap

public static java.util.Hashtable dissolveMap(java.util.Hashtable map)
Hash each hashable object that appears in the map

Requires that each value (not key) in the map be derived from Hashable.


find

public static Rec find(java.util.List list,
                       Key key_to_find)
given a list of records with Key-derived keys, locate the first one whose key matches key_to_find.

find

public static Rec find(java.util.List list,
                       java.lang.String key_to_find)
given a list of records with String-derived keys, locate the first one whose key matches key_to_find.

find

public static Rec find(java.util.List list,
                       java.lang.Number key_to_find)
given a list of records with Number-derived keys, locate the first one whose key matches key_to_find.

find

public static Rec find(java.util.List list,
                       int key_to_find)
given a list of records with int keys, locate the first one whose key matches key_to_find.


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