Package java.util

Examples of java.util.Vector.firstElement()


            TurbineResources.getVector("default.doctype", null);
        if (doctypeProperty != null && doctypeProperty.size() > 0)
        {
            if (doctypeProperty.size() == 1)
            {
                String doc = (String)doctypeProperty.firstElement();
                if (doc.equalsIgnoreCase("Html40Transitional"))
                {
                    data.getPage().setDoctype(new Doctype.Html40Transitional());
                }
                else if (doc.equalsIgnoreCase("Html40Strict"))
View Full Code Here


  }

  public Address getMasterAddress() {
    try {
      Vector members = channel.getView().getMembers();
      Address master = (Address) members.firstElement();
      channel.getState(master, 1000);
      return (Address) channel.getView().getMembers().firstElement();
    } catch (Exception e) {
      throw new RuntimeException(e.toString());
    }
View Full Code Here

         
        }
       
        //clean up closed consumer
        while (v.isEmpty() == false) {
          Object o = v.firstElement();
          connection.interestTable.remove( (Consumer) o);
          v.remove(o);
        }
       
    }
View Full Code Here

    void handleViewChange(View v) {
        Vector mbrs;
        if(local_addr == null)
            return;
        mbrs=v.getMembers();
        is_coord=mbrs != null && !mbrs.isEmpty() && local_addr.equals(mbrs.firstElement());
    }

    /**
     * @todo avoid sending up too many MERGE events.
     */
 
View Full Code Here

        Vector nestedRows = (Vector)fieldValue;
        if (nestedRows.isEmpty()) {
            return getObjectBuilder().createRecord(null);
        } else {
            // BUG#2667762 if the tag was empty this could be a string of whitespace.
            if (!(nestedRows.firstElement() instanceof XMLRecord)) {
                return getObjectBuilder().createRecord(null);
            }
            return (XMLRecord)nestedRows.firstElement();
        }
    }
View Full Code Here

        } else {
            // BUG#2667762 if the tag was empty this could be a string of whitespace.
            if (!(nestedRows.firstElement() instanceof XMLRecord)) {
                return getObjectBuilder().createRecord(null);
            }
            return (XMLRecord)nestedRows.firstElement();
        }
    }

    /**
     * INTERNAL:
 
View Full Code Here

        Vector nestedRows = (Vector) fieldValue;
        if (nestedRows.isEmpty()) {
            return getObjectBuilder().createRecord(null);
        } else {
            // BUG#2667762 - If the tag was empty this could be a string of whitespace.
            if (!(nestedRows.firstElement() instanceof AbstractRecord)) {
                return getObjectBuilder().createRecord(null);
            }
            return (XMLRecord) nestedRows.firstElement();
        }
    }
View Full Code Here

        } else {
            // BUG#2667762 - If the tag was empty this could be a string of whitespace.
            if (!(nestedRows.firstElement() instanceof AbstractRecord)) {
                return getObjectBuilder().createRecord(null);
            }
            return (XMLRecord) nestedRows.firstElement();
        }
    }

    /**
    * INTERNAL:
 
View Full Code Here

     *
     * @param name The name of the required child <code>Configuration</code>.
     */
    public Configuration getConfiguration(String name) {
      Vector v=(Vector)this.children.get(name);
        if ((v!=null) && (v.size()>0)) return((Configuration)v.firstElement());
        return(null);
  }

    /**
     * Return an <code>Enumeration</code> of <code>Configuration</code> objects
View Full Code Here

      }

      if (pce.size() == 0)
         return;

      String encoding = ((HttpHeaderElement)pce.firstElement()).getName();
      if (encoding.equalsIgnoreCase("gzip") || encoding.equalsIgnoreCase("x-gzip"))
      {
         if (log.isDebugEnabled())
            log.debug("Pushing gzip-input-stream");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.