|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<ReferenceItem>
fr.paris.lutece.util.ReferenceList
public class ReferenceList
This class provides the structure for a list of references values Each element includes a code and a name
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
ReferenceList()
|
|
| Method Summary | |
|---|---|
void |
addItem(int nCode,
String strName)
This method converts the int code specified in parameter as a String and adds a new element (code, name) to the list |
void |
addItem(String strCode,
String strName)
This method adds a new element (code, name) to the list |
void |
checkItems(String[] valuesToCheck)
CheckItems when are selected |
static ReferenceList |
convert(Collection collection,
String strCodeAttribute,
String strNameAttribute,
boolean bNumericCode)
Converts a collection to a ReferenceList |
static ReferenceList |
convert(Map<String,String> map)
Convert a Map |
Map<String,String> |
toMap()
Convert the ReferenceList into a map |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public ReferenceList()
| Method Detail |
|---|
public void addItem(String strCode,
String strName)
strCode - The code as a StringstrName - The name corresponding to the code as a String
public void addItem(int nCode,
String strName)
nCode - The code to convert an addstrName - The name corresponding to the code as a String
public static ReferenceList convert(Collection collection,
String strCodeAttribute,
String strNameAttribute,
boolean bNumericCode)
collection - The collection to convertstrCodeAttribute - The name of the code attribute. Ex : "id" to call getId()strNameAttribute - The name of the code attribute. Ex : "name" to call getName()bNumericCode - true if the code getter returns an Integer, false otherwise
public static ReferenceList convert(Map<String,String> map)
map - the map to convert
public Map<String,String> toMap()
public void checkItems(String[] valuesToCheck)
valuesToCheck - The list of string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||