From: David ‘Bombe’ Roden Date: Sun, 13 Nov 2011 11:30:24 +0000 (+0100) Subject: Add copy-constructor for own identities. X-Git-Tag: 0.7.3^2~9^2~4 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ebec36b762e50d1fa400a45128654632c5808703;p=Sone.git Add copy-constructor for own identities. --- diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java b/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java index ab46b43..ff52684 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java @@ -57,6 +57,20 @@ public class DefaultOwnIdentity extends DefaultIdentity implements OwnIdentity { this.insertUri = insertUri; } + /** + * Copy constructor for an own identity. + * + * @param webOfTrustConnector + * The web of trust connector + * @param ownIdentity + * The own identity to copy + */ + public DefaultOwnIdentity(WebOfTrustConnector webOfTrustConnector, OwnIdentity ownIdentity) { + super(webOfTrustConnector, ownIdentity.getId(), ownIdentity.getNickname(), ownIdentity.getRequestUri()); + this.webOfTrustConnector = webOfTrustConnector; + this.insertUri = ownIdentity.getInsertUri(); + } + // // ACCESSORS //