/** * Constructor for this class. * * <p> * Subclasses MUST implement the same public constructor. * * @param ps The read-only configuration for this context object. */ public Context(PropertyStore ps) { this.propertyStore = ps == null ? PropertyStore.DEFAULT : ps; this.hashCode = new HashCode().add(getClass().getName()).add(ps).get(); }
/** * Hashes the hashcode of the specified object into this object. * * @param o The object whose hashcode will be hashed with this object. * @return This object (for method chaining). */ public HashCode add(Object o) { o = unswap(o); add(o == null ? 1 : o.hashCode()); return this; }
/** * Hashes the hashcode of the specified object into this object. * * @param o The object whose hashcode will be hashed with this object. * @return This object (for method chaining). */ public HashCode add(Object o) { o = unswap(o); add(o == null ? 1 : o.hashCode()); return this; }
/** * Hashes the hashcode of the specified object into this object. * * @param o The object whose hashcode will be hashed with this object. * @return This object (for method chaining). */ public HashCode add(Object o) { o = unswap(o); add(o == null ? 1 : o.hashCode()); return this; }
/** * Constructor for this class. * * <p> * Subclasses MUST implement the same public constructor. * * @param ps The read-only configuration for this context object. * @param allowReuse If <jk>true</jk>, subclasses that share the same property store values can be reused. */ public Context(PropertyStore ps, boolean allowReuse) { this.propertyStore = ps == null ? PropertyStore.DEFAULT : ps; this.identityCode = allowReuse ? new HashCode().add(getClass().getName()).add(ps).get() : System.identityHashCode(this); }
/** * Returns a hashcode of this property store using only the specified group names. * * @param groups The names of the property groups to use in the calculation. * @return The hashcode. */ public Integer hashCode(String...groups) { HashCode c = new HashCode(); for (String p : groups) if (p != null) c.add(p).add(this.groups.get(p)); return c.get(); }
/** * Returns a hashcode of this property store using only the specified group names. * * @param groups The names of the property groups to use in the calculation. * @return The hashcode. */ public Integer hashCode(String...groups) { HashCode c = new HashCode(); for (String p : groups) if (p != null) c.add(p).add(this.groups.get(p)); return c.get(); }
/** * Constructor for this class. * * <p> * Subclasses MUST implement the same public constructor. * * @param ps The read-only configuration for this context object. * @param allowReuse If <jk>true</jk>, subclasses that share the same property store values can be reused. */ public Context(PropertyStore ps, boolean allowReuse) { this.propertyStore = ps == null ? PropertyStore.DEFAULT : ps; this.identityCode = allowReuse ? new HashCode().add(getClass().getName()).add(ps).get() : System.identityHashCode(this); }
/** * Returns a hashcode of this property store using only the specified group names. * * @param groups The names of the property groups to use in the calculation. * @return The hashcode. */ public Integer hashCode(String...groups) { HashCode c = new HashCode(); for (String p : groups) if (p != null) c.add(p).add(this.groups.get(p)); return c.get(); }
for (RestJavaMethod sm : context.getCallMethods().values()) if (sm.isRequestAllowed(req)) userHash.add(sm.hashCode()); int hashCode = userHash.get();
for (RestJavaMethod sm : context.getCallMethods().values()) if (sm.isRequestAllowed(req)) userHash.add(sm.hashCode()); int hashCode = userHash.get();
for (RestJavaMethod sm : context.getCallMethods().values()) if (sm.isRequestAllowed(req)) userHash.add(sm.hashCode()); int hashCode = userHash.get();