Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 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());
       }
     }
   }
 }
Ejemplo n.º 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;
  }
Ejemplo n.º 4
0
 /**
  * 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();
 }
Ejemplo n.º 5
0
 private TableEntry(String name) {
   this.name = name;
   instanceNeighbourMap = (TreeMap<String, String>) neighbourMap.clone();
   emptyMap(instanceNeighbourMap);
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 7
0
 /** @see de.interactive_instruments.ShapeChange.Model.ClassInfo#properties() */
 @SuppressWarnings("unchecked")
 public SortedMap<StructuredNumber, PropertyInfo> properties() {
   validatePropertiesCache();
   return (TreeMap<StructuredNumber, PropertyInfo>) propertiesCache.clone();
 } // properties()