Android Open Source - deborsi-notes Item List

From Project

Back to project page deborsi-notes.


The source code is released under:

GNU General Public License

If you think the Android project deborsi-notes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ca.ualberta.cs.deborsi_notes;
/*from   w w w .ja v  a2  s  .  c  o m*/
import java.util.ArrayList;

// Implements a list of item of type Item 

public class ItemList implements Serializable {
   * ItemList Serialization ID
  private static final long serialVersionUID = 1L;
  protected ArrayList<Item>itemList = null;
  protected transient ArrayList<Listener> listeners = null;
  // constructor for type ItemList
  public ItemList(){
    itemList = new ArrayList<Item>();
    listeners = new ArrayList<Listener>();
  private ArrayList<Listener>getListeners(){
    if (listeners == null){
      listeners = new ArrayList<Listener>();
  return listeners;

  public ArrayList<Item> getItems() {
    return itemList;

  public void addItem(Item testItem) {

  private void notifyListeners() {
    for (Listener listener : getListeners()){
  public void removeItem(Item testItem) {
  public int size() {
    return itemList.size();
  public void add(Item item) {
  public void remove(int i){
  public Item getItemIndex(int i){
    return itemList.get(i);

Java Source Code List