1 17 package org.apache.commons.collections.primitives.adapters; 18 19 import java.io.Serializable ; 20 import java.util.List ; 21 22 import org.apache.commons.collections.primitives.CharList; 23 24 36 public class ListCharList extends AbstractListCharList implements Serializable { 37 38 50 public static CharList wrap(List list) { 51 if(null == list) { 52 return null; 53 } else if(list instanceof Serializable ) { 54 return new ListCharList(list); 55 } else { 56 return new NonSerializableListCharList(list); 57 } 58 } 59 60 65 public ListCharList(List list) { 66 _list = list; 67 } 68 69 public String toString() { 70 return new String (toArray()); 72 } 73 74 protected List getList() { 75 return _list; 76 } 77 78 private List _list = null; 79 80 } 81 | Popular Tags |