Code example for Vector

Methods: clear, copyInto, size

0
        resultQueue.add (new CommandResult (reqId, result));
        return true; 
    } 
 
    public synchronized CommandResult[] flushResultList () { 
        CommandResult[] result = new CommandResult[resultQueue.size()];
        resultQueue.copyInto (result);
 
        resultQueue.clear();
        return result;
    } 
 
    public String toString() {
        return resultQueue.toString();
    } 
 
    class CommandResult { 
        public final int requestID;
        public final String [] result;
 
        public CommandResult(int reqId, String [] result) {