package Chapter11;

import java.util.*;

public class MultiValuedBean {

  // Multi-valued property
  private Vector list = new Vector(5);

  public MultiValuedBean() {

    // Build the list
    list.addElement(new String("Bob"));
    list.addElement(new String("Steve"));
    list.addElement(new String("Christy"));
    list.addElement(new String("Abby"));
    list.addElement(new String("Peyton"));
  }

  // This accessor returns a single property value
  // found at index.
  public String getList(int index) {

    return (String)list.elementAt(index);
  }

  // Returns the number of elements found in the
  // multi-valued property list.
  public int getListSize() {

    return list.size();
  }
} 