Exemple #1
0
 public Heap clone() {
   if (heap != null)
     return new Heap(
         (TreeMap<Location, JSObject>) heap.clone(),
         (HashMap<String, Location>) this.strValueMap.clone(),
         (HashMap<String, Location>) this.dummyObjectMap.clone(),
         this.getGlobal());
   else return null;
 }
 public void paint(Graphics g) {
   Graphics2D g2 = (Graphics2D) g;
   bg.paintIcon(this, g2, 0, 0);
   TreeMap<Integer, FactoryObject> to = (TreeMap<Integer, FactoryObject>) fos.clone();
   for (Integer i : to.keySet()) {
     FactoryObject t = to.get(i);
     if (t.getIsLine()) {
       g2.setColor(Color.WHITE);
       g2.drawLine(t.getPositionX(), t.getPositionY(), t.getPositionXF(), t.getPositionYF());
     } else {
       if (t.getImageIndex() >= 0) {
         ImageIcon tmp = images.getIcon(t.getImageIndex());
         tmp.paintIcon(this, g2, t.getPositionX(), t.getPositionY());
       }
     }
   }
 }
Exemple #3
0
  @Override
  public Object clone() {
    super.clone();

    final ColorScale result = new ColorScale();
    result.cache = null;
    result.interpolate = interpolate;
    result.min = min;
    result.max = max;
    result.nullColor = nullColor.clone();
    result.reliefShading = reliefShading;
    result.scaling = scaling;
    result.transparent = transparent;
    result.forceValuesIntoRange = forceValuesIntoRange;
    result.putAll(this);

    return result;
  }
 /**
  * Creates and returns a copy of this object.
  *
  * <p>Mutable second-class Objects are required to provide a public clone method in order to allow
  * for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not
  * throw a CloneNotSupportedException.
  *
  * @return The cloned object
  */
 public Object clone() {
   return delegate.clone();
 }
 private TableEntry(String name) {
   this.name = name;
   instanceNeighbourMap = (TreeMap<String, String>) neighbourMap.clone();
   emptyMap(instanceNeighbourMap);
 }
Exemple #6
0
 /**
  * Clone the internal data storage map.
  *
  * @return the cloned map, not null
  */
 @SuppressWarnings({"unchecked", "rawtypes"})
 private TreeMap<PeriodUnit, PeriodField> clonedMap() {
   return (TreeMap) unitFieldMap.clone();
 }
 /** @see de.interactive_instruments.ShapeChange.Model.ClassInfo#properties() */
 @SuppressWarnings("unchecked")
 public SortedMap<StructuredNumber, PropertyInfo> properties() {
   validatePropertiesCache();
   return (TreeMap<StructuredNumber, PropertyInfo>) propertiesCache.clone();
 } // properties()