Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mentawai.list
Class SimpleListData  view SimpleListData download SimpleListData.java

java.lang.Object
  extended byorg.mentawai.list.SimpleListData
All Implemented Interfaces:
ListData

public class SimpleListData
extends java.lang.Object
implements ListData

This class implements the simplest possible data list, with no locales or i18n files. Use this class if you don't want to deal with internationalization and i18n files, in other words, you just want a list.

Since:
1.1.1

Field Summary
private  java.util.List list
           
private  java.util.Map map
           
private  java.lang.String name
           
 
Constructor Summary
SimpleListData(java.lang.String name)
           
 
Method Summary
 void add(int id, java.lang.String msg)
           
 java.lang.String getName()
          Returns the name of this list.
 java.lang.String getValue(int id, java.util.Locale loc)
          Returns the string value of the list data item with the given id in the given locale.
 java.util.List getValues(java.util.Locale loc)
          Returns a list of ListDataItem in the given locale.
 int size()
          Returns the size of this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

private java.util.List list

map

private java.util.Map map

name

private java.lang.String name
Constructor Detail

SimpleListData

public SimpleListData(java.lang.String name)
Method Detail

add

public void add(int id,
                java.lang.String msg)

getValue

public java.lang.String getValue(int id,
                                 java.util.Locale loc)
Description copied from interface: ListData
Returns the string value of the list data item with the given id in the given locale.

Specified by:
getValue in interface ListData

getValues

public java.util.List getValues(java.util.Locale loc)
Description copied from interface: ListData
Returns a list of ListDataItem in the given locale.

Specified by:
getValues in interface ListData

getName

public java.lang.String getName()
Description copied from interface: ListData
Returns the name of this list.

Specified by:
getName in interface ListData

size

public int size()
Description copied from interface: ListData
Returns the size of this list. Note: the size does not depend on the number of locales.

Specified by:
size in interface ListData