Examples of clone()


Examples of java.util.Properties.clone()

          bean.set_owner(parent.get_owner());
         
          // set default namespace (of parent)
          Properties p = parent._xmlns;
          if (p==null) Gloze.logger.warn("parent has no default ns:" +parent);
          else bean._xmlns = (Properties) p.clone();
         
          //String xmlns = p!=null? (String)p.get(""):null;
          //if (xmlns!=null) bean._xmlns.put("", xmlns);
       
          ContentIFace content = bean.getContentModel();
View Full Code Here

Examples of java.util.SimpleTimeZone.clone()

        -1, Calendar.SUNDAY, 0);
    SimpleTimeZone stA = new SimpleTimeZone(1, "Gah");
    assertTrue("Clone resulted in same reference", st1.clone() != st1);
    assertTrue("Clone resulted in unequal object", ((SimpleTimeZone) st1
        .clone()).equals(st1));
    assertTrue("Clone resulted in same reference", stA.clone() != stA);
    assertTrue("Clone resulted in unequal object", ((SimpleTimeZone) stA
        .clone()).equals(stA));
  }

  /**
 
View Full Code Here

Examples of java.util.Stack.clone()

    Object o = ht.get(Thread.currentThread());
    if(o == null)
      return null;
    else {
      Stack stack = (Stack) o;
      return (Stack) stack.clone();
    }
  }

 
  /**
 
View Full Code Here

Examples of java.util.TreeMap.clone()

        // Map does not support clone()

        TreeMap torig = (TreeMap) _mgr.newMapProxy(TreeMap.class, null, null, new CustomComparator(), true);
        assertTrue(torig.comparator() instanceof CustomComparator);
        populate(torig);
        assertSortedMapsEquals(new TreeMap(torig), (SortedMap) torig.clone());
    }

    public void testMapMethodsProxied() throws Exception {
        Class proxy = _mgr.newMapProxy(HashMap.class, null, null, null, true).getClass();
        assertMapMethodsProxied(proxy);
View Full Code Here

Examples of java.util.TreeSet.clone()

        // List doesn't support clone()

        TreeSet torig = (TreeSet) _mgr.newCollectionProxy(TreeSet.class, null, new CustomComparator(), true);
        assertTrue(torig.comparator() instanceof CustomComparator);
        populate(torig);
        assertSortedSetsEquals(new TreeSet(torig), (SortedSet) torig.clone());
    }

    public void testListMethodsProxied() throws Exception {
        Class proxy = _mgr.newCollectionProxy(ArrayList.class, null, null, true).getClass();
        assertListMethodsProxied(proxy);
View Full Code Here

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

Examples of java.util.jar.Attributes.clone()

                Attributes otherSection = o.getValue();
                if ( ourSection == null )
                {
                    if ( otherSection != null )
                    {
                        target.getEntries().put( o.getKey(), (Attributes) otherSection.clone() );
                    }
                }
                else
                {
                    mergeAttributes( ourSection, otherSection );
View Full Code Here

Examples of java.util.jar.Manifest.clone()

    /**
     * @tests java.util.jar.Manifest#clone()
     */
    public void testClone() {
        Manifest m = getManifest(JAR_NAME);
        assertEquals(m, m.clone());
    }

    /**
     * @tests java.util.jar.Manifest#equals(java.lang.Object)
     */
 
View Full Code Here

Examples of javax.crypto.Mac.clone()

              mac1.init(null, params);
            else
              mac1.init(new SecretKeySpec(kb, macName), params);

            mac1.update(abc); // start with abc
            mac2 = (Mac) mac1.clone(); // now clone it

            ba1 = mac1.doFinal(in); // now finish both with in
            ba2 = mac2.doFinal(in);

            harness.check(Arrays.equals(ba1, ba2), "testCloneability("
View Full Code Here

Examples of javax.jcr.Workspace.clone()

                try {
                String srcPath = pathForId(srcNodeId, srcInfo);
                String destPath = getDestinationPath(destParentNodeId, destName, sInfo);

                Workspace wsp = sInfo.getSession().getWorkspace();
                wsp.clone(srcWorkspaceName, srcPath, destPath, removeExisting);
                } finally {
                    dispose(srcInfo);
                }
                return null;
            }
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.