com.quadrique.jbuildingblocks.core.dataStructure
Class JbbEnumArrayList<E extends Enum<E>,V>

java.lang.Object
  extended by com.quadrique.jbuildingblocks.core.dataStructure.JbbEnumArrayList<E,V>

public class JbbEnumArrayList<E extends Enum<E>,V>
extends Object

Utility data structure that is used to associate an enum value and an ArrayList collection of values.

public enum SearchType{ALL_USERS,_ALL_ADMIN_USERS,SPECIFIC_USERS};

// the search criteria JbbEnumArrayList searchCriteria = new JbbEnumArrayList(); // search for specific users searchCriteria.setEnumValue(SearchType.SPECIFIC_USERS); // the id of the corresponding users searchCriteria.getArrayList().add(12476); searchCriteria.getArrayList().add(12496);


Constructor Summary
JbbEnumArrayList()
           
 
Method Summary
 ArrayList<V> getArrayList()
           
 Enum<E> getEnumValue()
           
 int getIntValue()
          if there is a specific single item, returns the int value of that item.
 void setArrayList(ArrayList<V> arrayList)
           
 void setEnumValue(Enum<E> enumValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JbbEnumArrayList

public JbbEnumArrayList()
Method Detail

getArrayList

public ArrayList<V> getArrayList()
Returns:
the ArrayList instance

setArrayList

public void setArrayList(ArrayList<V> arrayList)
Parameters:
arrayList -

getEnumValue

public Enum<E> getEnumValue()
Returns:
the enum value

setEnumValue

public void setEnumValue(Enum<E> enumValue)
Parameters:
enumValue -

getIntValue

public int getIntValue()
if there is a specific single item, returns the int value of that item. otherwise returns enum ordinal.



Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.