/** * Evaluates. * @param params The parameter list. * @param filter Tge text match filter. * @return The result. */ private boolean evaluate(ParameterList params, TextMatchFilter filter) { // Evaluate textmatch filter against a set of parameters. // If any param matches, then evaluation succeeds. // This is basically a big OR for(Iterator<Parameter> it = params.iterator(); it.hasNext();) { Parameter param = it.next(); if(evaluate(param,filter)==true) { return true; } } return false; }
/** * Evaluates. * @param params The parameter list. * @param filter Tge text match filter. * @return The result. */ private boolean evaluate(ParameterList params, TextMatchFilter filter) { // Evaluate textmatch filter against a set of parameters. // If any param matches, then evaluation succeeds. // This is basically a big OR for(Iterator<Parameter> it = params.iterator(); it.hasNext();) { Parameter param = it.next(); if(evaluate(param,filter)==true) { return true; } } return false; }
/** * Creates a deep copy of the specified parameter list. That is, copies of all parameters in the specified list are * added to this list. * @param list a parameter list to copy parameters from * @param unmodifiable indicates whether the list should be mutable * @throws URISyntaxException where a parameter in the list specifies an invalid URI value */ public ParameterList(final ParameterList list, final boolean unmodifiable) throws URISyntaxException { parameters = new CopyOnWriteArrayList(); for (final Iterator i = list.iterator(); i.hasNext();) { final Parameter parameter = (Parameter) i.next(); parameters.add(parameter.copy()); } if (unmodifiable) { parameters = Collections.unmodifiableList(parameters); } }
/** * Creates a deep copy of the specified parameter list. That is, copies of all parameters in the specified list are * added to this list. * @param list a parameter list to copy parameters from * @param unmodifiable indicates whether the list should be mutable * @throws URISyntaxException where a parameter in the list specifies an invalid URI value */ public ParameterList(final ParameterList list, final boolean unmodifiable) throws URISyntaxException { final List<Parameter> parameterList = new CopyOnWriteArrayList<Parameter>(); for (final Iterator<Parameter> i = list.iterator(); i.hasNext();) { final Parameter parameter = i.next(); parameterList.add(parameter.copy()); } if (unmodifiable) { parameters = Collections.unmodifiableList(parameterList); } else { parameters = parameterList; } }
/** * Creates a deep copy of the specified parameter list. That is, copies of all parameters in the specified list are * added to this list. * @param list a parameter list to copy parameters from * @param unmodifiable indicates whether the list should be mutable * @throws URISyntaxException where a parameter in the list specifies an invalid URI value */ public ParameterList(final ParameterList list, final boolean unmodifiable) throws URISyntaxException { final List<Parameter> parameterList = new CopyOnWriteArrayList<Parameter>(); for (final Iterator<Parameter> i = list.iterator(); i.hasNext();) { final Parameter parameter = i.next(); parameterList.add(parameter.copy()); } if (unmodifiable) { parameters = Collections.unmodifiableList(parameterList); } else { parameters = parameterList; } }
private static void testXparams(final Property p, final Holder<Boolean> hasXparams) { if (hasXparams.value) { // No need to check return; } ParameterList params = p.getParameters(); Iterator parit = params.iterator(); while (parit.hasNext()) { Parameter param = (Parameter)parit.next(); if (!(param instanceof XParameter)) { continue; } XParameter xpar = (XParameter)param; if (xpar.getName().toUpperCase().equals(BwXproperty.xparUid)) { continue; } hasXparams.value = true; } } private static void processTimezones(final BwEvent ev,
/** * 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); }
/** * 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); }
/** * @param p * @return AbbreviatedValue */ public static AbbreviatedValue getAbbrevVal(final Property p) { ParameterList pars = p.getParameters(); ParameterList abbrevPars = pars.getParameters(Parameter.ABBREV); Collection<String> abbrevs = new ArrayList<String>(); Iterator it = abbrevPars.iterator(); while (it.hasNext()) { Parameter par = (Parameter)it.next(); abbrevs.add(par.getValue()); } return new AbbreviatedValue(abbrevs, p.getValue()); }
/** * Creates a new instance indexed on the parameters with the specified name. * @param list a list of properties * @param parameterName the name of parameters on which to index */ public IndexedPropertyList(final PropertyList list, final String parameterName) { final Map<String, PropertyList> indexedProperties = new HashMap<String, PropertyList>(); for (final Property property : list) { for (final Iterator<Parameter> j = property.getParameters(parameterName).iterator(); j.hasNext();) { final Parameter parameter = j.next(); PropertyList properties = indexedProperties.get(parameter.getValue()); if (properties == null) { properties = new PropertyList(); indexedProperties.put(parameter.getValue(), properties); } properties.add(property); } } this.index = Collections.unmodifiableMap(indexedProperties); }
/** * Creates a new instance indexed on the parameters with the specified name. * @param list a list of properties * @param parameterName the name of parameters on which to index */ public IndexedPropertyList(final PropertyList list, final String parameterName) { final Map indexedProperties = new HashMap(); for (final Iterator i = list.iterator(); i.hasNext();) { final Property property = (Property) i.next(); for (final Iterator j = property.getParameters(parameterName).iterator(); j.hasNext();) { final Parameter parameter = (Parameter) j.next(); PropertyList properties = (PropertyList) indexedProperties.get(parameter.getValue()); if (properties == null) { properties = new PropertyList(); indexedProperties.put(parameter.getValue(), properties); } properties.add(property); } } this.index = Collections.unmodifiableMap(indexedProperties); }
/** * Creates a new instance indexed on the parameters with the specified name. * @param list a list of properties * @param parameterName the name of parameters on which to index */ public IndexedPropertyList(final PropertyList<Property> list, final String parameterName) { final Map<String, PropertyList<Property>> indexedProperties = new HashMap<String, PropertyList<Property>>(); for (final Iterator<Property> i = list.iterator(); i.hasNext();) { final Property property = (Property) i.next(); for (final Iterator<Parameter> j = property.getParameters(parameterName).iterator(); j.hasNext();) { final Parameter parameter = (Parameter) j.next(); PropertyList<Property> properties = indexedProperties.get(parameter.getValue()); if (properties == null) { properties = new PropertyList<Property>(); indexedProperties.put(parameter.getValue(), properties); } properties.add(property); } } this.index = Collections.unmodifiableMap(indexedProperties); }
public static void addFields(final JsonGenerator jgen, final Property prop) throws CalFacadeException { try { jgen.writeStartObject(); ParameterList pl = prop.getParameters(); if ((pl != null) && (pl.size() > 0)) { Iterator it = pl.iterator(); while (it.hasNext()) { Parameter p = (Parameter)it.next(); String nm = p.getName().toLowerCase(); jgen.writeFieldName(nm); if (multiMap.get(nm) == null) { jgen.writeString(p.getValue()); } else { outValue(jgen, p); } } } jgen.writeEndObject(); } catch (Throwable t) { throw new CalFacadeException(t); } }
Iterator parit = params.iterator(); while (parit.hasNext()) { Parameter param = (Parameter)parit.next();
static void processParameters(final ParameterList icparams, final BasePropertyType prop) throws Throwable { if ((icparams == null) || icparams.isEmpty()) { return; } final Iterator it = icparams.iterator(); while (it.hasNext()) { final Parameter param = (Parameter)it.next(); final ParameterInfoIndex pii = ParameterInfoIndex.lookupPname(param.getName()); if (pii == null) { continue; } final JAXBElement<? extends BaseParameterType> xmlprop = doParameter(param, pii); if (xmlprop != null) { if (prop.getParameters() == null) { prop.setParameters(new ArrayOfParameters()); } prop.getParameters().getBaseParameter().add(xmlprop); } } }
Iterator<Parameter> iter = organizer.getParameters().iterator();
Iterator<Parameter> iter = attendee.getParameters().iterator();
xml.openTag(XcalTags.parameters); Iterator pli = pl.iterator(); while (pli.hasNext()) { xmlParameter(xml, (Parameter)pli.next());