/** * Replace any parameters of the same type with the one specified. * @param parameter parameter to add to this list in place of all others with the same name * @return true if successfully added to this list */ public final boolean replace(final Parameter parameter) { for (final Iterator<Parameter> i = getParameters(parameter.getName()).iterator(); i.hasNext();) { remove(i.next()); } return add(parameter); }
/** * Replace any parameters of the same type with the one specified. * @param parameter parameter to add to this list in place of all others with the same name * @return true if successfully added to this list */ public final boolean replace(final Parameter parameter) { for (final Iterator i = getParameters(parameter.getName()).iterator(); i.hasNext();) { remove((Parameter) i.next()); } return add(parameter); }
/** * Replace any parameters of the same type with the one specified. * @param parameter parameter to add to this list in place of all others with the same name * @return true if successfully added to this list */ public final boolean replace(final Parameter parameter) { for (final Iterator<Parameter> i = getParameters(parameter.getName()).iterator(); i.hasNext();) { remove(i.next()); } return add(parameter); }
protected static void replaceParameter(ParameterList parameterList, Parameter parameter) { if (parameter == null) { return; } Parameter existingParam = parameterList.getParameter(parameter.getName()); if (existingParam != null) { parameterList.remove(existingParam); } parameterList.add(parameter); }
/** * Replace any parameters of the same type with the one specified. * @param parameter parameter to add to this list in place of all others with the same name * @return true if successfully added to this list */ public final boolean replace(final Parameter parameter) { for (Parameter parameter1 : getParameters(parameter.getName())) { remove(parameter1); } return add(parameter); }
/** * Replace any parameters of the same type with the one specified. * @param parameter parameter to add to this list in place of all others with the same name * @return true if successfully added to this list */ public final boolean replace(final Parameter parameter) { for (Parameter parameter1 : getParameters(parameter.getName())) { remove(parameter1); } return add(parameter); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
private void fixDateTimeProperties(Component component) { PropertyList<Property> props = component.getProperties(); for(Property prop : props) { if(prop instanceof DateProperty || prop instanceof DateListProperty) { Value v = (Value) prop.getParameter(Parameter.VALUE); if(Value.DATE_TIME.equals(v)) { prop.getParameters().remove(v); } } } }
private void fixDateTimeProperties(Component component) { PropertyList<Property> props = component.getProperties(); for(Property prop : props) { if(prop instanceof DateProperty || prop instanceof DateListProperty) { Value v = (Value) prop.getParameter(Parameter.VALUE); if(Value.DATE_TIME.equals(v)) { prop.getParameters().remove(v); } } } }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); } }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the VTIMEZONE associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * @param utc a UTC value */ public final void setUtc(final boolean utc) { if (getDate() != null && (getDate() instanceof DateTime)) { ((DateTime) getDate()).setUtc(utc); } getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the VTIMEZONE associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc a UTC value */ public final void setUtc(final boolean utc) { if (getDate() != null && (getDate() instanceof DateTime)) { ((DateTime) getDate()).setUtc(utc); } getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the VTIMEZONE associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc a UTC value */ public final void setUtc(final boolean utc) { if (getDate() != null && (getDate() instanceof DateTime)) { ((DateTime) getDate()).setUtc(utc); } getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the VTIMEZONE associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc a UTC value */ public final void setUtc(final boolean utc) { if (getDate() != null && (getDate() instanceof DateTime)) { ((DateTime) getDate()).setUtc(utc); } getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the VTIMEZONE associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc a UTC value */ public final void setUtc(final boolean utc) { if (getDate() != null && (getDate() instanceof DateTime)) { ((DateTime) getDate()).setUtc(utc); } getParameters().remove(getParameter(Parameter.TZID)); }
protected void setMissing(Property prop, boolean missing) { Parameter parameter = prop.getParameters().getParameter(PARAM_OSAF_MISSING); if (missing) { if (parameter == null) { prop.getParameters().add( new XParameter(PARAM_OSAF_MISSING, VALUE_TRUE)); } } else { if (parameter != null) { prop.getParameters().remove(parameter); } } }
protected void setMissing(Property prop, boolean missing) { Parameter parameter = prop.getParameters().getParameter(PARAM_OSAF_MISSING); if (missing) { if (parameter == null) { prop.getParameters().add( new XParameter(PARAM_OSAF_MISSING, VALUE_TRUE)); } } else { if (parameter != null) { prop.getParameters().remove(parameter); } } }