Package java.util

Examples of java.util.Vector.clone()


            Hashtable branchesClone = new Hashtable();
            Enumeration branchesList = this.branches.keys();
            while (branchesList.hasMoreElements()) {
                Object key = branchesList.nextElement();
                Vector value = (Vector) this.branches.get(key);
                branchesClone.put(key, value.clone());
            }
            result.branches = branchesClone;
            // Cloning latest revision list
            result.latestRevisionNumbers =
                (Hashtable) this.latestRevisionNumbers.clone();
View Full Code Here


    protected void copyEventListeners(NodeImpl src, NodeImpl tgt) {
        Vector nodeListeners = getEventListeners(src);
  if (nodeListeners == null) {
      return;
  }
  setEventListeners(tgt, (Vector) nodeListeners.clone());
    }

    /**
     * Introduced in DOM Level 2. <p>
     * Distribution engine for DOM Level 2 Events.
View Full Code Here

        boolean isCloned = false;
        for(int i = 0; i < size; i++) {
            RenderedImage img = (RenderedImage)sourceVector.get(i);
            if(!(img instanceof Serializable)) {
                if(!isCloned) {
                    sourceVector = (Vector)sourceVector.clone();
                }
                sourceVector.set(i, new SerializableRenderedImage(img, false));
            }
        }
        return sourceVector;
View Full Code Here

     * <code>ParameterBlock</code> of this node.
     * This may differ from the source vector of the rendering of the node.
     */
    public synchronized Vector getSources() {
        Vector srcs = nodeSupport.getParameterBlock().getSources();
        return srcs == null ? null : (Vector)srcs.clone();
    }

    /**
     * Replaces the sources in the <code>ParameterBlock</code> of this node
     * with a new list of sources.
View Full Code Here

     * <code>ParameterBlock</code> of this node.
     */
    public synchronized Vector getParameters() {
        // In the Sun JDK ParameterBlock the parameter Vector is never null.
        Vector params = nodeSupport.getParameterBlock().getParameters();
        return params == null ? null : (Vector)params.clone();
    }

    /**
     * Returns the specified parameter stored in the
     * <code>ParameterBlock</code> of this node as a <code>byte</code>.
View Full Code Here

        senders.addElement(sender1);
        senders.addElement(sender2);
        senders.addElement(sender3);

        mywin.add(seqno, msg, (Vector)senders.clone()); // clone() for the fun of it...

        mywin.ack(seqno, sender1);
        mywin.ack(seqno, sender2);

        System.out.println("entry is " + mywin.printDetails(seqno));
View Full Code Here

                rebroadcastMsgs((Vector)evt.getArg());
                break;

            case Event.TMP_VIEW:
                Vector mbrs=((View)evt.getArg()).getMembers();
                members=mbrs != null? (Vector)mbrs.clone() : new Vector(11);
                break;

            case Event.VIEW_CHANGE:
                synchronized(this) {
                    view=((View)((View)evt.getArg()).clone());
View Full Code Here

    protected void copyEventListeners(NodeImpl src, NodeImpl tgt) {
        Vector nodeListeners = getEventListeners(src);
        if (nodeListeners == null) {
            return;
        }
        setEventListeners(tgt, (Vector) nodeListeners.clone());
    }

    /**
     * Introduced in DOM Level 2. <p>
     * Distribution engine for DOM Level 2 Events.
View Full Code Here

          if (method.getRequest() != null) {
            RequestNode request = method.getRequest();
            if (request.getAllParams() != null) {
              Vector allParams = request.getAllParams();
              int paramIndex = 0;
              for(Iterator k = ((Vector) allParams.clone()).iterator(); k.hasNext(); /* empty */) {
                ParamNode p = (ParamNode) k.next();
                if (p.getName().equals(param.getName()) &&
                    p.getValue().equals(param.getValue())) {                 
                  request.removeParam(p);                 
                  ParamNode referenceParam = new ParamNode(param.getName(), request, application);
View Full Code Here

            Hashtable branchesClone = new Hashtable();
            Enumeration branchesList = this.branches.keys();
            while (branchesList.hasMoreElements()) {
                Object key = branchesList.nextElement();
                Vector value = (Vector) this.branches.get(key);
                branchesClone.put(key, value.clone());
            }
            result.branches = branchesClone;
            // Cloning latest revision list
            result.latestRevisionNumbers =
                (Hashtable) this.latestRevisionNumbers.clone();
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.