com.sun.perseus.demo
Class ContactListSource

java.lang.Object
  extended by com.sun.perseus.demo.ContactListSource
All Implemented Interfaces:
SVGList.ListModel

public class ContactListSource
extends java.lang.Object
implements SVGList.ListModel

Encapsulates retrieving contact information.


Field Summary
static int ADDRESS_1
           
static int ADDRESS_2
           
static int CELL_PHONE
           
static int EMAIL
           
static int HOME_PHONE
           
static int NAME
           
static int WORK_PHONE
           
 
Constructor Summary
ContactListSource()
           
 
Method Summary
 int firstIndexFor(char c)
           
 java.lang.Object getElementAt(int ci)
           
 int getSize()
          Returns the list's length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final int NAME
See Also:
Constant Field Values

EMAIL

public static final int EMAIL
See Also:
Constant Field Values

CELL_PHONE

public static final int CELL_PHONE
See Also:
Constant Field Values

WORK_PHONE

public static final int WORK_PHONE
See Also:
Constant Field Values

HOME_PHONE

public static final int HOME_PHONE
See Also:
Constant Field Values

ADDRESS_1

public static final int ADDRESS_1
See Also:
Constant Field Values

ADDRESS_2

public static final int ADDRESS_2
See Also:
Constant Field Values
Constructor Detail

ContactListSource

public ContactListSource()
Method Detail

firstIndexFor

public int firstIndexFor(char c)
Parameters:
c - the first character for the searched contact.
Returns:
the index of the first contact entry with the given character

getSize

public final int getSize()
Description copied from interface: SVGList.ListModel
Returns the list's length.

Specified by:
getSize in interface SVGList.ListModel
Returns:
the number of contact entries.

getElementAt

public java.lang.Object getElementAt(int ci)
Specified by:
getElementAt in interface SVGList.ListModel
Parameters:
ci - the requested contact index.
Returns:
an object holding the contact details data.