Examples of clone()


Examples of java.util.ArrayList.clone()

        // Check cache, even for null nat
        SoftReference ref = (SoftReference)getFlavorsForNativeCache.get(nat);
        if (ref != null) {
            ArrayList retval = (ArrayList)ref.get();
            if (retval != null) {
                return (List)retval.clone();
            }
        }

        LinkedList retval = new LinkedList();
View Full Code Here

Examples of java.util.BitSet.clone()

        if ((sm.getPCState() == PCState.PDIRTY
            && (!sm.isFlushed() || sm.isFlushedDirty()))
            || (sm.getPCState() == PCState.PNEW && sm.isFlushedDirty())) {
            BitSet dirty = sm.getDirty();
            if (sm.isFlushed()) {
                dirty = (BitSet) dirty.clone();
                dirty.andNot(sm.getFlushed());
            }
            if (dirty.length() > 0)
                return dirty;
        }
View Full Code Here

Examples of java.util.Calendar.clone()

          while ( hunter.getTime().before(end) ){               //JJHNOTE
            if ( hunter.get(Calendar.YEAR) == curProtoDate.get(Calendar.YEAR) ){
              if ( !needSameMonth || ( needSameMonth && hunter.get(Calendar.MONTH) == curProtoDate.get(Calendar.MONTH) ) ){
                if ( !needSameWeek || ( needSameWeek && hunter.get(Calendar.WEEK_OF_YEAR) == curProtoDate.get(Calendar.WEEK_OF_YEAR)) ){
                  if ( !needSameDay || ( needSameDay && hunter.get(Calendar.DAY_OF_YEAR) == curProtoDate.get(Calendar.DAY_OF_YEAR)) ){
                    result.add( hunter.clone() );
                  }
                }
              }
            }
            hunter.add( Calendar.WEEK_OF_YEAR, 1);
View Full Code Here

Examples of java.util.Date.clone()

public class A {
 
  public void doStuff() {
    Date date = new Date();
    date.clone();
  }

}
View Full Code Here

Examples of java.util.GregorianCalendar.clone()

      Map<String,Integer> failureModes = new HashMap<String,Integer>();
      for(Entry<GregorianCalendar,DumpElement> entry : map.entrySet()) {
        GregorianCalendar date = entry.getKey();
        DumpElement element = entry.getValue();
        if(element.pullTimes != null) {
          date = (GregorianCalendar) date.clone();
          date.add(Calendar.DAY_OF_MONTH, -delta);
          System.out.println("Checking "+date.getTime()+" for "+element.date.getTime()+" delta "+delta);
          DumpElement inserted = map.get(date);
          if(inserted == null) {
            System.out.println("No match");
View Full Code Here

Examples of java.util.HashMap.clone()

                childHash.put("total_digits", hashContentsElements.get("TOTAL_DIGITS"));
                childHash.put("min_occurs", hashContentsElements.get("MIN_OCCURS")  );
                childHash.put("max_occurs", hashContentsElements.get("MAX_OCCURS") );
                childHash.put("column_name", hashContentsElements.get("COLUMN_NAME") );
                childHash.put("content_id", sContentID);
                allTags.add(childHash.clone());
           
            }
                       
           
        } catch (Exception e) {
View Full Code Here

Examples of java.util.HashSet.clone()

     * properties of this node.
     */
    public synchronized void setPropertyNames(Set propNames) {
        if (propNames instanceof HashSet) {
            HashSet names = (HashSet) propNames;
            propertyNames = (HashSet) names.clone();
            sharedPropertyNames = false;
        } else {
            if (sharedPropertyNames) {
                propertyNames = new HashSet();
                sharedPropertyNames = false;
View Full Code Here

Examples of java.util.Hashtable.clone()

    String refTableName = refTd.getSchemaName() + "." + refTd.getName();
    //look for the other foreign key constraints on this table first
    int currentSelfRefValue = getCurrentDeleteConnections(dd, td, -1, deleteConnHashtable, false, true);
    validateDeleteConnection(dd, td, refTd,
                 refAction,
                 deleteConnHashtable, (Hashtable) deleteConnHashtable.clone(),
                 true, myConstraintName, false ,
                 new StringBuffer(0), refTableName,
                 isSelfReferencingFk,
                 currentSelfRefValue);
View Full Code Here

Examples of java.util.IdentityHashMap.clone()

    Collection values = map.values();
    assertEquals("values() does not work",
        "value", values.iterator().next());
    assertEquals("keySet() does not work",
        "key", keys.iterator().next());
    AbstractMap map2 = (AbstractMap) map.clone();
    map2.put("key", "value2");
    Collection values2 = map2.values();
    assertTrue("values() is identical", values2 != values);
    // values() and keySet() on the cloned() map should be different
    assertEquals("values() was not cloned",
View Full Code Here

Examples of java.util.LinkedHashMap.clone()

      {
        map.namespaces = (LinkedHashMap<String, LinkedHashMap<String, T>>) namespaces.clone();
        for (final Map.Entry<String, LinkedHashMap<String, T>> entry : map.namespaces.entrySet())
        {
          final LinkedHashMap value = entry.getValue();
          entry.setValue((LinkedHashMap<String, T>) value.clone());
        }
      }
      return map;
    }
    catch (final CloneNotSupportedException cne)
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.