Package gov.nist.core

Examples of gov.nist.core.NameValue


      this.lexer.SPorHT();
      while (lexer.lookAhead(0) == ';') {
        this.lexer.match(';');
        this.lexer.SPorHT();

        NameValue nv = super.nameValue('=');
        accessNetworkInfo.setParameter(nv);
        this.lexer.SPorHT();
      }
      this.lexer.SPorHT();
      this.lexer.match('\n');
View Full Code Here


     *
     * unexpectedly while parsing the parameter name or value.
     *
     */
    public void setParameter(String name, String value) throws ParseException {
        NameValue nv = parameters.getNameValue(name);
        if (nv != null) {
            nv.setValueAsObject(value);
        } else {
            nv = new NameValue(name, value);
            this.parameters.set(nv);
        }
    }
View Full Code Here

     * unexpectedly while parsing the parameter name or value.
     *
     */
    public void setQuotedParameter(String name, String value)
        throws ParseException {
        NameValue nv = parameters.getNameValue(name);
        if (nv != null) {
            nv.setValueAsObject(value);
            nv.setQuotedValue();
        } else {
            nv = new NameValue(name, value);
            nv.setQuotedValue();
            this.parameters.set(nv);
        }
    }
View Full Code Here

     * unexpectedly while parsing the parameter name or value.
     *
     */
    protected void setParameter(String name, float value) {
        Float val = Float.valueOf(value);
        NameValue nv = parameters.getNameValue(name);
        if (nv != null) {
            nv.setValueAsObject(val);
        } else {
            nv = new NameValue(name, val);
            this.parameters.set(nv);
        }
    }
View Full Code Here

     * @param name of the parameter
     * @param value of the parameter
     */
    public void setMultiParameter(String name, String value)
    {
      NameValue nv = new NameValue();
      nv.setName(name);
      nv.setValue(value);
      duplicates.set(nv);
    }
View Full Code Here

     */
    public ListIterator getChargingCollectionFunctionAddresses() {

        Iterator li = this.parameters.iterator();
        ListIterator ccfLIST = null;
        NameValue nv;
        while (li.hasNext()) {
            nv = (NameValue) li.next();
            if (nv.getName().equalsIgnoreCase(ParameterNamesIms.CCF)) {

                NameValue ccfNV = new NameValue();

                ccfNV.setName(nv.getName());
                ccfNV.setValueAsObject(nv.getValueAsObject());

                ccfLIST.add(ccfNV);

            }
        }
View Full Code Here

      LinkedList<NameValue> listw = new LinkedList<NameValue>();
  
        Iterator li = this.parameters.iterator();
        ListIterator<NameValue> ecfLIST = listw.listIterator();
        NameValue nv;
        boolean removed = false;
        while (li.hasNext()) {
            nv = (NameValue) li.next();
            if (nv.getName().equalsIgnoreCase(ParameterNamesIms.ECF)) {

                NameValue ecfNV = new NameValue();

                ecfNV.setName(nv.getName());
                ecfNV.setValueAsObject(nv.getValueAsObject());

                ecfLIST.add(ecfNV);

            }
        }
View Full Code Here

     * @param name - of the parameter
     * @return true if parameter was removed, and false if not
     */
    public boolean delete(String value, String name) {
        Iterator li = this.parameters.iterator();
        NameValue nv;
        boolean removed = false;
        while (li.hasNext()) {
            nv = (NameValue) li.next();
            if (((String) nv.getValueAsObject()).equalsIgnoreCase(value) && nv.getName().equalsIgnoreCase(name)) {
                li.remove();
                removed = true;
            }
        }

View Full Code Here

  public void setParameter(String name, String value) throws ParseException
  {
    if (value == null)
      throw new NullPointerException("null value");
   
    NameValue nv = super.parameters.getNameValue(name.toLowerCase());
    if (nv == null)
    {
      nv = new NameValue(name, value);
     
      // quoted values
      if (name.equalsIgnoreCase(ParameterNamesIms.D_VER))
      {
        nv.setQuotedValue();
       
        if (value.startsWith(Separators.DOUBLE_QUOTE))
          throw new ParseException(value
              + " : Unexpected DOUBLE_QUOTE", 0);
      }
   
      super.setParameter(nv);
    }
    else
    {
      nv.setValueAsObject(value);
    }
   
  }
View Full Code Here

    public void setTTL(int ttl) throws InvalidArgumentException {
        if (ttl < 0 && ttl != -1)
            throw new InvalidArgumentException(
                "JAIN-SIP Exception"
                    + ", Via, setTTL(), the ttl parameter is < 0");
        setParameter(new NameValue(ParameterNames.TTL, Integer.valueOf(ttl)));
    }
View Full Code Here

TOP

Related Classes of gov.nist.core.NameValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.