java.lang.Object
org.mentawai.list.BaseListData
- All Implemented Interfaces:
- ListData
- public class BaseListData
- extends java.lang.Object
- implements ListData
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FULLDIR
private static final java.lang.String FULLDIR
SEP
private static final java.lang.String SEP
ORDER_BY_ID
public static final int ORDER_BY_ID
- See Also:
- Constant Field Values
ORDER_BY_VALUE
public static final int ORDER_BY_VALUE
- See Also:
- Constant Field Values
ORDER_BY_FILE
public static final int ORDER_BY_FILE
- See Also:
- Constant Field Values
listname
private java.lang.String listname
ordertype
private int ordertype
listDir
private java.lang.String listDir
map
private java.util.Map map
values
private java.util.Map values
BaseListData
public BaseListData(java.lang.String listname,
int ordertype,
java.lang.String listDir)
throws java.io.IOException
BaseListData
public BaseListData(java.lang.String listname,
int ordertype)
throws java.io.IOException
BaseListData
public BaseListData(java.lang.String listname)
throws java.io.IOException
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
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
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
loadFileToList
private java.util.List loadFileToList(java.util.Locale loc)
throws java.io.IOException
loadI18N
private org.mentawai.i18n.I18N loadI18N(java.util.Locale loc)
throws java.io.IOException
getIdFromLine
private int getIdFromLine(java.lang.String line)
sort
private void sort(java.util.List list,
int ordertype)
load
protected void load()
throws java.io.IOException