public X509CertPathImpl(List<? extends java.security.cert.Certificate> certs) throws CertificateException {
  super("X.509");
  final int size=certs.size();
  certificates=new ArrayList<X509Certificate>(size);
  for (int i=0; i < size; i++) {
    final java.security.cert.Certificate cert=certs.get(i);
    if (!(cert instanceof X509Certificate)) {
      throw new CertificateException("Certificate " + i + " is not an X.509 certificate");
    }
    certificates.add((X509Certificate)cert);
  }
}

public X509CertPathImpl ( List < ? extends java . security . cert . Certificate > certs ) throws CertificateException { super ( "X.509" ) ; final int size = certs . size ( ) ; certificates = new ArrayList < X509Certificate > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { final java . security . cert . Certificate cert = certs . get ( i ) ; if ( ! ( cert instanceof X509Certificate ) ) { throw new CertificateException ( "Certificate " + i + " is not an X.509 certificate" ) ; } certificates . add ( ( X509Certificate ) cert ) ; } }
creates an instance of x . 509 certpath over the specified list of certificates .
