1 17 package org.apache.commons.collections.primitives.adapters; 18 19 import java.io.Serializable ; 20 import java.util.Collection ; 21 22 import org.apache.commons.collections.primitives.IntCollection; 23 24 37 final public class CollectionIntCollection extends AbstractCollectionIntCollection implements Serializable { 38 49 public static IntCollection wrap(Collection collection) { 50 if(null == collection) { 51 return null; 52 } else if(collection instanceof Serializable ) { 53 return new CollectionIntCollection(collection); 54 } else { 55 return new NonSerializableCollectionIntCollection(collection); 56 } 57 } 58 59 64 public CollectionIntCollection(Collection collection) { 65 _collection = collection; 66 } 67 68 protected Collection getCollection() { 69 return _collection; 70 } 71 72 private Collection _collection = null; 73 } 74 | Popular Tags |