/** * 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(); }
/** * Create a new HashCode object. * * @return A new HashCode object. */ public static final HashCode create() { return new HashCode(); }
/** * Create a new HashCode object. * * @return A new HashCode object. */ public static final HashCode create() { return new HashCode(); }
/** * 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(); }
/** * Create a new HashCode object. * * @return A new HashCode object. */ public static final HashCode create() { return new HashCode(); }
/** * 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. */ public Context(PropertyStore ps) { this.propertyStore = ps == null ? PropertyStore.DEFAULT : ps; this.hashCode = new HashCode().add(getClass().getName()).add(ps).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); }
/** * 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); }