1 7 8 package java.security.cert; 9 10 import java.io.Serializable ; 11 import java.util.Collection ; 12 import java.util.Collections ; 13 14 38 public class CollectionCertStoreParameters 39 implements CertStoreParameters { 40 41 private Collection coll; 42 43 69 public CollectionCertStoreParameters(Collection <?> collection) { 70 if (collection == null) 71 throw new NullPointerException (); 72 coll = collection; 73 } 74 75 80 public CollectionCertStoreParameters() { 81 coll = Collections.EMPTY_SET; 82 } 83 84 93 public Collection <?> getCollection() { 94 return coll; 95 } 96 97 103 public Object clone() { 104 try { 105 return super.clone(); 106 } catch (CloneNotSupportedException e) { 107 108 throw new InternalError (e.toString()); 109 } 110 } 111 112 117 public String toString() { 118 StringBuffer sb = new StringBuffer (); 119 sb.append("CollectionCertStoreParameters: [\n"); 120 sb.append(" collection: " + coll + "\n"); 121 sb.append("]"); 122 return sb.toString(); 123 } 124 } 125 | Popular Tags |