1 package net.pterodactylus.util.fcp;
4 * Container for ARKs (address resolution keys).
6 * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
11 /** The public URI of the ARK. */
12 private final String publicURI;
14 /** The private URI of the ARK. */
15 private final String privateURI;
17 /** The number of the ARK. */
18 private final int number;
21 * Creates a new ARK with the given URI and number.
24 * The public URI of the ARK
26 * The number of the ARK
28 public ARK(String publicURI, String number) {
29 this(publicURI, null, number);
33 * Creates a new ARK with the given URIs and number.
36 * The public URI of the ARK
38 * The private URI of the ARK
40 * The number of the ARK
42 public ARK(String publicURI, String privateURI, String number) {
43 if ((publicURI == null) || (number == null)) {
44 throw new NullPointerException(((publicURI == null) ? "publicURI" : "number") + " must not be null");
46 this.publicURI = publicURI;
47 this.privateURI = privateURI;
49 this.number = Integer.valueOf(number);
50 } catch (NumberFormatException nfe1) {
51 throw new IllegalArgumentException("number must be numeric", nfe1);
56 * Returns the public URI of the ARK.
58 * @return The public URI of the ARK
60 public String getPublicURI() {
65 * Returns the private URI of the ARK.
67 * @return The private URI of the ARK
69 public String getPrivateURI() {
74 * Returns the number of the ARK.
76 * @return The number of the ARK
78 public int getNumber() {