Package java.util

Examples of java.util.Vector.trimToSize()


    public static Vector sortComparableEnumeration(Enumeration e) {
  Vector sorted = new Vector() ;
  while ( e.hasMoreElements() ) {
      orderedComparableInsert((Comparable) e.nextElement(), sorted) ;
  }
  sorted.trimToSize();
  return sorted ;
    }

    /**
     * Sort the given String array in place.
View Full Code Here


   */
  public void test_trimToSize() {
    // Test for method void java.util.Vector.trimToSize()
    Vector v = new Vector(10);
    v.addElement(new Object());
    v.trimToSize();
    assertEquals("Failed to trim capacity", 1, v.capacity());
  }

  protected Vector vectorClone(Vector s) {
    return (Vector) s.clone();
View Full Code Here

      }
    }
       
    if (implementations.isEmpty())
      return null;
    implementations.trimToSize();

    return implementations;
  }

    private boolean getPersistentServiceImplementation( Class possibleModule)
View Full Code Here

      }
    }
       
    if (implementations.isEmpty())
      return null;
    implementations.trimToSize();

    return implementations;
  }

    private boolean getPersistentServiceImplementation( Class possibleModule)
View Full Code Here

            }
        }

    if (implementations.isEmpty())
      return null;
    implementations.trimToSize();

    return implementations;
  }

    private boolean getPersistentServiceImplementation( Class possibleModule)
View Full Code Here

    Vector v = new Vector();
    v.add(model);
    if (header != null) {
      v.add(header);
    }
    v.trimToSize();
    KOML.write(saveTo.getAbsolutePath(), v);
  }

  /**
   * Save a model in XStream deep object serialized XML form.
View Full Code Here

    Vector v = new Vector();
    v.add(model);
    if (header != null) {
      v.add(header);
    }
    v.trimToSize();
    XStream.write(saveTo.getAbsolutePath(), v);
  }

  /**
   * Get the directory that the model(s) will be saved into
View Full Code Here

                        row.indexOf("=") + 1).trim().replaceAll(
                        "\"", ""));
                    alternatives.add(alternative);
                  }
                }
                alternatives.trimToSize();
                var.setAlternatvies(alternatives);
              }
           
              if(arry[ALTERNATIVESDATECOLUMN] != null) {
                Vector alternatives = var.getAlternatvies();
View Full Code Here

                    alternative.setEndDate(((row.substring(row
                        .indexOf("/") + 1).trim()).replaceAll("\"",
                        "")).replaceAll("\\)", ""));
                  }
                }
                alternatives.trimToSize();
                var.setAlternatvies(alternatives);
              }             
            }
          } catch (ClassNotFoundException cnfe) {
            log.log(Level.ERROR, "Unable to locate element class", cnfe);
View Full Code Here

     
  if (lastChar != 0) options.addElement(new RETokenChar(subIndex,lastChar,insens));
     
  // Create a new RETokenOneOf
  addToken(currentToken);
  options.trimToSize();
  currentToken = new RETokenOneOf(subIndex,options,negative);
      }

      // SUBEXPRESSIONS
      //  (...) | \(...\) depending on RE_NO_BK_PARENS
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.