jdk/src/share/classes/java/security/cert/PKIXBuilderParameters.java
author juh
Tue, 25 Jun 2013 14:31:29 -0700
changeset 18551 882a3948c6e6
parent 5506 202f599c92aa
child 24969 afa6934dd8e8
permissions -rw-r--r--
8017325: Cleanup of the javadoc <code> tag in java.security.cert Summary: Convert javadoc <code>...</code> and <tt>...</tt> tags to {@code ...} Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
     2
 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.security.cert;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.security.KeyStore;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.security.KeyStoreException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.security.InvalidAlgorithmParameterException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.security.InvalidParameterException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.util.Set;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
/**
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    35
 * Parameters used as input for the PKIX {@code CertPathBuilder}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * algorithm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * <p>
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    38
 * A PKIX {@code CertPathBuilder} uses these parameters to {@link
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    39
 * CertPathBuilder#build build} a {@code CertPath} which has been
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * validated according to the PKIX certification path validation algorithm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 *
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    42
 * <p>To instantiate a {@code PKIXBuilderParameters} object, an
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * application must specify one or more <i>most-trusted CAs</i> as defined by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * the PKIX certification path validation algorithm. The most-trusted CA
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * can be specified using one of two constructors. An application
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * can call {@link #PKIXBuilderParameters(Set, CertSelector)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * PKIXBuilderParameters(Set, CertSelector)}, specifying a
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    48
 * {@code Set} of {@code TrustAnchor} objects, each of which
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * identifies a most-trusted CA. Alternatively, an application can call
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * {@link #PKIXBuilderParameters(KeyStore, CertSelector)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * PKIXBuilderParameters(KeyStore, CertSelector)}, specifying a
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    52
 * {@code KeyStore} instance containing trusted certificate entries, each
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * of which will be considered as a most-trusted CA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * <p>In addition, an application must specify constraints on the target
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    56
 * certificate that the {@code CertPathBuilder} will attempt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * to build a path to. The constraints are specified as a
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    58
 * {@code CertSelector} object. These constraints should provide the
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    59
 * {@code CertPathBuilder} with enough search criteria to find the target
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    60
 * certificate. Minimal criteria for an {@code X509Certificate} usually
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * include the subject name and/or one or more subject alternative names.
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    62
 * If enough criteria is not specified, the {@code CertPathBuilder}
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    63
 * may throw a {@code CertPathBuilderException}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * <b>Concurrent Access</b>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * Unless otherwise specified, the methods defined in this class are not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * thread-safe. Multiple threads that need to access a single
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * object concurrently should synchronize amongst themselves and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * provide the necessary locking. Multiple threads each manipulating
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * separate objects need not synchronize.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * @see CertPathBuilder
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * @since       1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * @author      Sean Mullan
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
public class PKIXBuilderParameters extends PKIXParameters {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    private int maxPathLength = 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    /**
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    83
     * Creates an instance of {@code PKIXBuilderParameters} with
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    84
     * the specified {@code Set} of most-trusted CAs.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * Each element of the set is a {@link TrustAnchor TrustAnchor}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     *
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    87
     * <p>Note that the {@code Set} is copied to protect against
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * subsequent modifications.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     *
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    90
     * @param trustAnchors a {@code Set} of {@code TrustAnchor}s
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    91
     * @param targetConstraints a {@code CertSelector} specifying the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * constraints on the target certificate
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    93
     * @throws InvalidAlgorithmParameterException if {@code trustAnchors}
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    94
     * is empty {@code (trustAnchors.isEmpty() == true)}
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    95
     * @throws NullPointerException if {@code trustAnchors} is
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    96
     * {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     * @throws ClassCastException if any of the elements of
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    98
     * {@code trustAnchors} are not of type
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
    99
     * {@code java.security.cert.TrustAnchor}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    public PKIXBuilderParameters(Set<TrustAnchor> trustAnchors, CertSelector
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        targetConstraints) throws InvalidAlgorithmParameterException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        super(trustAnchors);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        setTargetCertConstraints(targetConstraints);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    /**
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   109
     * Creates an instance of {@code PKIXBuilderParameters} that
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * populates the set of most-trusted CAs from the trusted
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   111
     * certificate entries contained in the specified {@code KeyStore}.
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   112
     * Only keystore entries that contain trusted {@code X509Certificate}s
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * are considered; all other certificate types are ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     *
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   115
     * @param keystore a {@code KeyStore} from which the set of
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     * most-trusted CAs will be populated
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   117
     * @param targetConstraints a {@code CertSelector} specifying the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * constraints on the target certificate
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   119
     * @throws KeyStoreException if {@code keystore} has not been
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * initialized
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   121
     * @throws InvalidAlgorithmParameterException if {@code keystore} does
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * not contain at least one trusted certificate entry
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   123
     * @throws NullPointerException if {@code keystore} is
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   124
     * {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    public PKIXBuilderParameters(KeyStore keystore,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        CertSelector targetConstraints)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        throws KeyStoreException, InvalidAlgorithmParameterException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        super(keystore);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        setTargetCertConstraints(targetConstraints);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     * Sets the value of the maximum number of non-self-issued intermediate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * certificates that may exist in a certification path. A certificate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * is self-issued if the DNs that appear in the subject and issuer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * fields are identical and are not empty. Note that the last certificate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * in a certification path is not an intermediate certificate, and is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * included in this limit. Usually the last certificate is an end entity
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * certificate, but it can be a CA certificate. A PKIX
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   142
     * {@code CertPathBuilder} instance must not build
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * paths longer than the length specified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * <p> A value of 0 implies that the path can only contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * a single certificate. A value of -1 implies that the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * path length is unconstrained (i.e. there is no maximum).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * The default maximum path length, if not specified, is 5.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * Setting a value less than -1 will cause an exception to be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * <p> If any of the CA certificates contain the
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   152
     * {@code BasicConstraintsExtension}, the value of the
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   153
     * {@code pathLenConstraint} field of the extension overrides
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     * the maximum path length parameter whenever the result is a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * certification path of smaller length.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * @param maxPathLength the maximum number of non-self-issued intermediate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     *  certificates that may exist in a certification path
18551
882a3948c6e6 8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents: 5506
diff changeset
   159
     * @throws InvalidParameterException if {@code maxPathLength} is set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     *  to a value less than -1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * @see #getMaxPathLength
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    public void setMaxPathLength(int maxPathLength) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        if (maxPathLength < -1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            throw new InvalidParameterException("the maximum path "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                + "length parameter can not be less than -1");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        this.maxPathLength = maxPathLength;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * Returns the value of the maximum number of intermediate non-self-issued
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * certificates that may exist in a certification path. See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * the {@link #setMaxPathLength} method for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * @return the maximum number of non-self-issued intermediate certificates
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     *  that may exist in a certification path, or -1 if there is no limit
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * @see #setMaxPathLength
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    public int getMaxPathLength() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        return maxPathLength;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * Returns a formatted string describing the parameters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * @return a formatted string describing the parameters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        StringBuffer sb = new StringBuffer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        sb.append("[\n");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        sb.append(super.toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
        sb.append("  Maximum Path Length: " + maxPathLength + "\n");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        sb.append("]\n");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        return sb.toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
}