VectorのJavaプログラミングにおけるアプリケーション


java.util   Vector<E> 
boolean add(E o) 
              。 
void add(int index, E element) 
                。 
boolean addAll(Collection<? extends E> c) 
    Collection                ,                      。 
boolean addAll(int index, Collection<? extends E> c) 
         Collection              。 
void addElement(E obj) 
               ,       1。 
int capacity() 
          。 
void clear() 
           。 
Object clone() 
         。 
boolean contains(Object elem) 
                 。 
boolean containsAll(Collection<?> c) 
          Collection       ,    true。 
void copyInto(Object[] anArray) 
                。 
E elementAt(int index) 
          。 
Enumeration<E> elements() 
           。 
void ensureCapacity(int minCapacity) 
        (    ),                      。 
boolean equals(Object o) 
              。 
E firstElement() 
           (     0    )。 
E get(int index) 
            。 
int hashCode() 
          。 
int indexOf(Object elem) 
             ,   equals        。 
int indexOf(Object elem, int index) 
             ,  index      ,    equals         。 
void insertElementAt(E obj, int index) 
                     index  。 
boolean isEmpty() 
            。 
E lastElement() 
            。 
int lastIndexOf(Object elem) 
                      。 
int lastIndexOf(Object elem, int index) 
         ,           ,       。 
E remove(int index) 
             。 
boolean remove(Object o) 
                 ,          ,       。 
boolean removeAll(Collection<?> c) 
             Collection       。 
void removeAllElements() 
           ,         。 
boolean removeElement(Object obj) 
             (     )   。 
void removeElementAt(int index) 
          。 
protected void removeRange(int fromIndex, int toIndex) 
   List          fromIndex(  )  toIndex(   )       。 
boolean retainAll(Collection<?> c) 
              Collection     。 
E set(int index, E element) 
                    。 
void setElementAt(E obj, int index) 
       index             。 
void setSize(int newSize) 
        。 
int size() 
          。 
List<E> subList(int fromIndex, int toIndex) 
    List      ,       fromIndex(  )  toIndex(   )。 
Object[] toArray() 
      ,                  。 
<T> T[] 
toArray(T[] a) 
      ,                  ;                  。 
String toString() 
             ,          String     。 
void trimToSize() 
           ,           。


 
import java.lang.System;
import java.util.Vector;
import java.util.Emumeration;
public class Avector{
  public static void main(String args[]){
   Vector v=new Vector();
   v.addElement("one");
   v.addElement("two");
  v.addElement("three");
  v.insertElementAt("zero",0);
  v.insertElementAt("oop",3);
  v.setElementAt("three",3);
     v.setElementAt("four",4);
   v.removeAllElements();
}
}