/** * Return the original PropertyValue instance for this value holder. * @return the original PropertyValue (either a source of this * value holder or this value holder itself). */ public PropertyValue getOriginalPropertyValue() { PropertyValue original = this; Object source = getSource(); while (source instanceof PropertyValue && source != original) { original = (PropertyValue) source; source = original.getSource(); } return original; }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof PropertyValue)) { return false; } PropertyValue otherPv = (PropertyValue) other; return (this.name.equals(otherPv.name) && ObjectUtils.nullSafeEquals(this.value, otherPv.value) && ObjectUtils.nullSafeEquals(getSource(), otherPv.getSource())); }
/** * Return the original PropertyValue instance for this value holder. * @return the original PropertyValue (either a source of this * value holder or this value holder itself). */ public PropertyValue getOriginalPropertyValue() { PropertyValue original = this; Object source = getSource(); while (source instanceof PropertyValue && source != original) { original = (PropertyValue) source; source = original.getSource(); } return original; }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof PropertyValue)) { return false; } PropertyValue otherPv = (PropertyValue) other; return (this.name.equals(otherPv.name) && ObjectUtils.nullSafeEquals(this.value, otherPv.value) && ObjectUtils.nullSafeEquals(getSource(), otherPv.getSource())); }
/** * Copy constructor. * @param original the PropertyValue to copy (never {@code null}) */ public PropertyValue(PropertyValue original) { Assert.notNull(original, "Original must not be null"); this.name = original.getName(); this.value = original.getValue(); this.optional = original.isOptional(); this.converted = original.converted; this.convertedValue = original.convertedValue; this.conversionNecessary = original.conversionNecessary; this.resolvedTokens = original.resolvedTokens; setSource(original.getSource()); copyAttributesFrom(original); }
/** * Copy constructor. * @param original the PropertyValue to copy (never {@code null}) */ public PropertyValue(PropertyValue original) { Assert.notNull(original, "Original must not be null"); this.name = original.getName(); this.value = original.getValue(); this.optional = original.isOptional(); this.converted = original.converted; this.convertedValue = original.convertedValue; this.conversionNecessary = original.conversionNecessary; this.resolvedTokens = original.resolvedTokens; setSource(original.getSource()); copyAttributesFrom(original); }
/** * Copy constructor. * @param original the PropertyValue to copy (never <code>null</code>) */ public PropertyValue(PropertyValue original) { Assert.notNull(original, "Original must not be null"); this.name = original.getName(); this.value = original.getValue(); this.source = original.getSource(); this.optional = original.isOptional(); this.converted = original.converted; this.convertedValue = original.convertedValue; this.conversionNecessary = original.conversionNecessary; this.resolvedTokens = original.resolvedTokens; this.resolvedDescriptor = original.resolvedDescriptor; copyAttributesFrom(original); }
/** * Return the original PropertyValue instance for this value holder. * @return the original PropertyValue (either a source of this * value holder or this value holder itself). */ public PropertyValue getOriginalPropertyValue() { PropertyValue original = this; Object source = getSource(); while (source instanceof PropertyValue && source != original) { original = (PropertyValue) source; source = original.getSource(); } return original; }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof PropertyValue)) { return false; } PropertyValue otherPv = (PropertyValue) other; return (this.name.equals(otherPv.name) && ObjectUtils.nullSafeEquals(this.value, otherPv.value) && ObjectUtils.nullSafeEquals(getSource(), otherPv.getSource())); }
/** * Copy constructor. * @param original the PropertyValue to copy (never {@code null}) */ public PropertyValue(PropertyValue original) { Assert.notNull(original, "Original must not be null"); this.name = original.getName(); this.value = original.getValue(); this.optional = original.isOptional(); this.converted = original.converted; this.convertedValue = original.convertedValue; this.conversionNecessary = original.conversionNecessary; this.resolvedTokens = original.resolvedTokens; setSource(original.getSource()); copyAttributesFrom(original); }