Package java.util

Examples of java.util.Vector.trimToSize()


    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

            }
        }

    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

                }

            }  // end For loop

            // return the String array if we have matches
            currCodeVector.trimToSize();
            if (currCodeVector.size() != 0)
            {
                return ((String[])currCodeVector.toArray(new String[0]));
            }
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

          members.addElement( makeMethodDescriptor( methods[i], nMemberPos ) );
        }
        ++nMemberPos;
      }
     
      members.trimToSize();
      XInterfaceMemberTypeDescription[] ar = new XInterfaceMemberTypeDescription[members.size()];
      if (! members.isEmpty())
        members.copyInto( ar );
      _members = ar;
      return;
View Full Code Here

                }

            }  // end For loop

            // return the String array if we have matches
            currCodeVector.trimToSize();
            if (currCodeVector.size() != 0)
            {
                return ((String[])currCodeVector.toArray(new String[0]));
            }
View Full Code Here

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

    return implementations;
  }

    private boolean getPersistentServiceImplementation( Class possibleModule)
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.