|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.cert.CollectionCertStoreParameters
public class CollectionCertStoreParameters
An implementation of CertStoreParameters
with a simple,
in-memory Collection
of certificates and certificate
revocation list.
Note that this class is not thread-safe, and its underlying collection may be changed at any time.
CertStore
Constructor Summary | |
---|---|
CollectionCertStoreParameters()
Creates a new CollectionCertStoreParameters with an empty, immutable collection. |
|
CollectionCertStoreParameters(Collection<?> collection)
Create a new CollectionCertStoreParameters with the specified collection. |
Method Summary | |
---|---|
Object |
clone()
This method may be called to create a new copy of the Object. |
Collection<?> |
getCollection()
Return the underlying collection. |
String |
toString()
Return a string representation of these parameters. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CollectionCertStoreParameters()
public CollectionCertStoreParameters(Collection<?> collection)
collection
- The collection.
NullPointerException
- If collection is null.Method Detail |
---|
public Object clone()
Object
o == o.clone()
is falseo.getClass() == o.clone().getClass()
is trueo.equals(o)
is trueHowever, these are not strict requirements, and may
be violated if necessary. Of the three requirements, the
last is the most commonly violated, particularly if the
subclass does not override Object.equals(Object)
.
If the Object you call clone() on does not implement
Cloneable
(which is a placeholder interface), then
a CloneNotSupportedException is thrown. Notice that
Object does not implement Cloneable; this method exists
as a convenience for subclasses that do.
Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.
All array types implement Cloneable, and override
this method as follows (it should never fail):
public Object clone() { try { super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.getMessage()); } }
clone
in interface CertStoreParameters
clone
in class Object
Cloneable
public Collection<?> getCollection()
public String toString()
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |