+ setPropertiesPrivate(properties);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setTrust(Identity target, int trustValue, String comment) throws WebOfTrustException {
+ Validation.begin().isNotNull("Trust Target", target).isNotNull("Trust Comment", comment).isLessOrEqual("Trust Value", trustValue, 100).isGreaterOrEqual("Trust Value", trustValue, -100).check();
+ webOfTrustConnector.setTrust(this, target, trustValue, comment);
+ if (target instanceof DefaultIdentity) {
+ ((DefaultIdentity) target).setTrustPrivate(this, new Trust(trustValue, trustValue, 0));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void removeTrust(Identity target) throws WebOfTrustException {
+ Validation.begin().isNotNull("Trust Target", target).check();
+ webOfTrustConnector.removeTrust(this, target);
+ if (target instanceof DefaultIdentity) {
+ ((DefaultIdentity) target).setTrustPrivate(this, new Trust(null, null, null));
+ }
+ }
+
+ //
+ // OBJECT METHODS
+ //
+
+ @Override
+ public int hashCode() {
+ /* The hash of DefaultIdentity is fine. */
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ /* The ID of the superclass is still enough. */
+ return super.equals(object);