/** * Returns the first property of specified name. * @param aName name of property to return * @return a property or null if no matching property found */ public final <R> R getProperty(final String aName) { for (final T p : this) { if (p.getName().equalsIgnoreCase(aName)) { return (R) p; } } return null; }
/** * Returns the first property of specified name. * @param aName name of property to return * @return a property or null if no matching property found */ public final T getProperty(final String aName) { for (final T p : this) { if (p.getName().equalsIgnoreCase(aName)) { return p; } } return null; }
/** * Returns the first property of specified name. * @param aName name of property to return * @return a property or null if no matching property found */ public final <R> R getProperty(final String aName) { for (final T p : this) { if (p.getName().equalsIgnoreCase(aName)) { return (R) p; } } return null; }
/** * * @param property The property. * @param buffer The string buffer. */ private void chompPropertyValue(Property property, StringBuilder buffer) { buffer.append(property.getName()). append(property.getParameters()). append(':'). append("\n"); }
/** * * @param property The property. * @param buffer The string buffer. */ private void chompPropertyValue(Property property, StringBuilder buffer) { buffer.append(property.getName()). append(property.getParameters()). append(':'). append("\n"); }
/** * Returns the first property of specified name. * @param aName name of property to return * @return a property or null if no matching property found */ public final Property getProperty(final String aName) { for (final Iterator i = iterator(); i.hasNext();) { final Property p = (Property) i.next(); if (p.getName().equalsIgnoreCase(aName)) { return p; } } return null; }
/** * {@inheritDoc} */ public int hashCode() { // as property name is case-insensitive generate hash for uppercase.. return new HashCodeBuilder().append(getName().toUpperCase()).append( getValue()).append(getParameters()).toHashCode(); }
/** * {@inheritDoc} */ public final int hashCode() { // as property name is case-insensitive generate hash for uppercase.. return new HashCodeBuilder().append(getName().toUpperCase()).append( getValue()).append(getParameters()).toHashCode(); }
/** * {@inheritDoc} */ public final boolean equals(final Object arg0) { if (arg0 instanceof Property) { final Property p = (Property) arg0; return getName().equals(p.getName()) && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals(); } return super.equals(arg0); }
/** * {@inheritDoc} */ public int hashCode() { // as property name is case-insensitive generate hash for uppercase.. return new HashCodeBuilder().append(getName().toUpperCase()).append( getValue()).append(getParameters()).toHashCode(); }
/** * {@inheritDoc} */ public int hashCode() { // as property name is case-insensitive generate hash for uppercase.. return new HashCodeBuilder().append(getName().toUpperCase()).append( getValue()).append(getParameters()).toHashCode(); }
/** * {@inheritDoc} */ public int hashCode() { // as property name is case-insensitive generate hash for uppercase.. return new HashCodeBuilder().append(getName().toUpperCase()).append( getValue()).append(getParameters()).toHashCode(); }
/** * {@inheritDoc} */ public final boolean equals(final Object arg0) { if (arg0 instanceof Property) { final Property p = (Property) arg0; return getName().equals(p.getName()) && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals(); } return super.equals(arg0); }
/** * {@inheritDoc} */ public final boolean equals(final Object arg0) { if (arg0 instanceof Property) { final Property p = (Property) arg0; return getName().equals(p.getName()) && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals(); } return super.equals(arg0); }
/** * {@inheritDoc} */ public final boolean equals(final Object arg0) { if (arg0 instanceof Property) { final Property p = (Property) arg0; return getName().equals(p.getName()) && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals(); } return super.equals(arg0); }
private static void outValue(final JsonGenerator jgen, final Property prop, final DataType type) throws Throwable { final String nm = prop.getName().toLowerCase(); final PropertyValueEmitter pve = valMap.get(nm); if (pve == null) { defValEmitter.emitValue(jgen, prop, type); return; } pve.emitValue(jgen, prop); } }
protected static void replaceProperty(PropertyList propertyList, Property property) { if (property == null) { return; } Property existingProp = propertyList.getProperty(property.getName()); if (existingProp != null) { propertyList.remove(existingProp); } propertyList.add(property); }
/** * Adds or replaces the property in a component. * @param component Component to modify. * @param property Property to add or update. */ public static void addOrReplaceProperty(Component component, Property property){ Property oldProp = component.getProperties().getProperty(property.getName()); if (oldProp != null){ component.getProperties().remove(oldProp); } component.getProperties().add(property); }