Package java.util

Examples of java.util.Vector.firstElement()


                  if (! isAscending[i])
                    ascIndex = false;
                  break;
                }
              }
              FromBaseTable fbt = (FromBaseTable)tableVector.firstElement();
              MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)ad;

              /*  MAX   ASC      NULLABLE
                             *  ----  ----------
               *  TRUE  TRUE      TRUE/FALSE  =  Special Last Key Scan (ASC Index Last key with null skips)
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

      l.add("Test " + i);
    v.addElement(l);

    Collection s = new HashSet();
    Object o;
    s.add(o = v.firstElement());
    v.removeAll(s);
    assertTrue("Failed to remove items in collection", !v.contains(o));
    v.removeAll(l);
    assertTrue("Failed to remove all elements", v.isEmpty());
View Full Code Here

    assertEquals("Should not have removed any elements", 3, v.size());
    l = new LinkedList();
    l.add(null);
    v.removeAll(l);
    assertEquals("Should only have one element", 1, v.size());
    assertEquals("Element should be 'Boom'", "Boom", v.firstElement());
  }

  /**
   * @tests java.util.Vector#removeAllElements()
   */
 
View Full Code Here

        Vector doctypeProperty = 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

     *
     * @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

      }
      // insert the Locale in ordered list
      int     qidx = 0;
      int     size = locales.size();
      if (size > 0) {
    QLocale ql   = (QLocale) locales.firstElement();
    while ((qidx < size) && (ql.getLanguageQuality() >= quality)) {
        try {
      ql = (QLocale) locales.elementAt(++qidx);
        } catch (ArrayIndexOutOfBoundsException ex) {
      //end of vector, so append
View Full Code Here

        stNode = (STNodeEx)nodesInStOrder.elementAt(i);
        ((PQNodeEx)stNode.getRef().getExtender()).setStNumber(stNode.getStNumber());
        nodesInStOrder.setElementAt(stNode.getRef().getExtender(), i);
      }

      PQNodeEx currentNode = (PQNodeEx)nodesInStOrder.firstElement();
      enumEdges = currentNode.incidentEdges().elements();
      while ( enumEdges.hasMoreElements() )
      {
        pqTree.getRoot().addChild( ((PQEdgeEx)enumEdges.nextElement()).getPQNode() );
      }
View Full Code Here

 
  public Vector incidentEdgesToSmallerCanonicalNumber()
  {
    Vector incidentEdges = incidentEdges();
    int startIndex = -1;
    NormalEdgeEx currentEdge = (NormalEdgeEx)incidentEdges.firstElement();
    if ( ((NormalNodeEx)currentEdge.otherEndFrom(this)).getCanonicalNumber() <
         canonicalNumber )
    {
      for ( int i=incidentEdges.size()-1; i>=0; i-- )
      {
View Full Code Here

      g.createNodeExtenders(new DFSNodeEx().getClass());
      g.createEdgeExtenders(new DFSEdgeEx().getClass());
    }
    Vector nodes = g.getNodeExtenders();

    depthFirstSearch(g, (DFSNodeEx)nodes.firstElement(), true);
  }

  public static Vector depthFirstSearch(Graph g, DFSNodeEx startNode, boolean reset)
  {
    LogEntry logEntry = g.startLogEntry("Depth First Search");
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.