Code example for Vector

Methods: add, iterator

0
    /* 
     * Mock charset provider. 
     */ 
    public static class MockCharsetProvider extends CharsetProvider {
 
        public Charset charsetForName(String charsetName) {
            if ("MockCharset10".equalsIgnoreCase(charsetName)
                    || "MockCharset11".equalsIgnoreCase(charsetName)
                    || "MockCharset12".equalsIgnoreCase(charsetName)) {
                return charset2;
            } 
            return null; 
        } 
 
        public Iterator<Charset> charsets() {
            Vector<Charset> v = new Vector<Charset>();
            v.add(charset2);
            return v.iterator();
        } 
    }