From 97575e0f0e6dd16852becb1246bf9d3454b7de68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 18 Dec 2010 01:54:20 +0100 Subject: [PATCH] Add field to trust accessor that denotes whether the trust can be incremented. --- src/main/java/net/pterodactylus/sone/template/TrustAccessor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/template/TrustAccessor.java b/src/main/java/net/pterodactylus/sone/template/TrustAccessor.java index b14d382..4dfd81e 100644 --- a/src/main/java/net/pterodactylus/sone/template/TrustAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/TrustAccessor.java @@ -43,6 +43,8 @@ public class TrustAccessor extends ReflectionAccessor { Trust trust = (Trust) object; if ("assigned".equals(member)) { return trust.getExplicit() != null; + } else if ("maximum".equals(member)) { + return ((trust.getExplicit() != null) && (trust.getExplicit() >= 100)) || ((trust.getImplicit() != null) && (trust.getImplicit() >= 100)); } else if ("hasDistance".equals(member)) { return (trust.getDistance() != null) && (trust.getDistance() != Integer.MAX_VALUE); } -- 2.7.4