Copies each of the parameters, except the position, from a
<CODE>Rectangle</CODE> object if the value is set there

@param rect <CODE>Rectangle</CODE> to copy from
963520
public void softCloneNonPositionParameters(Rectangle rect) {
		if (rect.rotation != 0)
			this.rotation = rect.rotation;
		if (rect.backgroundColor != null)
			this.backgroundColor = rect.backgroundColor;
		if (rect.border != UNDEFINED)
			this.border = rect.border;
		if (useVariableBorders)
			this.useVariableBorders = rect.useVariableBorders;
		if (rect.borderWidth != UNDEFINED)
			this.borderWidth = rect.borderWidth;
		if (rect.borderWidthLeft != UNDEFINED)
			this.borderWidthLeft = rect.borderWidthLeft;
		if (rect.borderWidthRight != UNDEFINED)
			this.borderWidthRight = rect.borderWidthRight;
		if (rect.borderWidthTop != UNDEFINED)
			this.borderWidthTop = rect.borderWidthTop;
		if (rect.borderWidthBottom != UNDEFINED)
			this.borderWidthBottom = rect.borderWidthBottom;
		if (rect.borderColor != null)
			this.borderColor = rect.borderColor;
		if (rect.borderColorLeft != null)
			this.borderColorLeft = rect.borderColorLeft;
		if (rect.borderColorRight != null)
			this.borderColorRight = rect.borderColorRight;
		if (rect.borderColorTop != null)
			this.borderColorTop = rect.borderColorTop;
		if (rect.borderColorBottom != null)
			this.borderColorBottom = rect.borderColorBottom;
	}
613567
public void copyFrom(PointerCoords other) {
        final long bits = other.mPackedAxisBits;
        mPackedAxisBits = bits;
        if (bits != 0) {
            final float[] otherValues = other.mPackedAxisValues;
            final int count = Long.bitCount(bits);
            float[] values = mPackedAxisValues;
            if (values == null || count > values.length) {
                values = new float[otherValues.length];
                mPackedAxisValues = values;
            }
            System.arraycopy(otherValues, 0, values, 0, count);
        }

        x = other.x;
        y = other.y;
        pressure = other.pressure;
        size = other.size;
        touchMajor = other.touchMajor;
        touchMinor = other.touchMinor;
        toolMajor = other.toolMajor;
        toolMinor = other.toolMinor;
        orientation = other.orientation;
    }
206310
public Rectangle getRect() {
        verifyPropertyPresence(RECT);
        //noinspection unchecked
        return mapToRect((Map<String, Object>) getCommandResult().get(RECT));
    }
261068
public void copyTo(RelatedItemAdditionalProperties copyTo) {
        copyTo.numberOfProperties = numberOfProperties;
        RelatedItemAdditionalProperty[] copyToProperties = copyTo.additionalProperties;
        RelatedItemAdditionalProperty[] srcToProperties = this.additionalProperties;
        for(int i=0;i<numberOfProperties;i++) {
            srcToProperties[i].copyTo(copyToProperties[i]);
        }
    }
1072043
@Override
  public void setImageBounds(RectF imageBounds) {
    if (!imageBounds.equals(mImageBounds)) {
      mImageBounds.set(imageBounds);
      onTransformChanged();
      if (mImageBoundsListener != null) {
        mImageBoundsListener.onImageBoundsSet(mImageBounds);
      }
    }
  }
395876
public void copyFrom(LockSet other) {
        if (other.array.length != array.length) {
            array = new int[other.array.length];
        }
        System.arraycopy(other.array, 0, array, 0, array.length);
        this.defaultLockCount = other.defaultLockCount;
    }
752754
@Override
    public void copyFrom(Frame<IsNullValue> other) {
        super.copyFrom(other);
        decision = ((IsNullValueFrame) other).decision;
        if (trackValueNumbers) {
            knownValueMap = Util.makeSmallHashMap(((IsNullValueFrame) other).knownValueMap);
        }
    }
747555
private void copyToOffset(int offset) {
    final int minCapacity = 2 * (offset + nbrruns);
    if (valueslength.length < minCapacity) {
      // expensive case where we need to reallocate
      int newCapacity = valueslength.length;
      while (newCapacity < minCapacity) {
        newCapacity = (newCapacity == 0) ? DEFAULT_INIT_SIZE
            : newCapacity < 64 ? newCapacity * 2
                : newCapacity < 1024 ? newCapacity * 3 / 2 : newCapacity * 5 / 4;
      }
      short[] newvalueslength = new short[newCapacity];
      copyValuesLength(this.valueslength, 0, newvalueslength, offset, nbrruns);
      this.valueslength = newvalueslength;
    } else {
      // efficient case where we just copy
      copyValuesLength(this.valueslength, 0, this.valueslength, offset, nbrruns);
    }
  }
139714
public void putAll (IntMap<V> t)
    {
        // if we can, avoid creating Integer objects while copying
        for (IntEntry<V> entry : t.intEntrySet()) {
            put(entry.getIntKey(), entry.getValue());
        }
    }
286861
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) {
        getMapHelper().copyValuesFromTo(otherMap, map);
    }
253663
protected void setImage(RenderedImage image, Rectangle rect) throws IOException {
        ByteBuffer buff = ImageIOHelper.getImageByteBuffer(image);
        int bpp;
        DataBuffer dbuff = image.getData(new Rectangle(1, 1)).getDataBuffer();
        if (dbuff instanceof DataBufferByte) {
            bpp = image.getColorModel().getPixelSize();
        } else {
            bpp = 8; // BufferedImage.TYPE_BYTE_GRAY image
        }
        setImage(image.getWidth(), image.getHeight(), buff, rect, bpp);
    }
578751
@Override
    public void putAll(Map<? extends K, ? extends V> m) {
	for (Map.Entry<? extends K, ? extends V> e: m.entrySet())
	    put(e.getKey(), e.getValue());
    }

    /**
     * Removes the key (and its corresponding value) from this map. This method does nothing if the key
     * is not in the map.
     *
     * @param key the key that needs to be removed
     * @return the previous value associated with <tt>key</tt>, or <tt>null</tt> if there was no mapping
     *         for <tt>key</tt>
     * @throws NullPointerException if the specified key is null
     */
    @Override
    public V remove(Object key) {
	int hash = hash(key);
	return segmentFor(hash).remove(key, hash, null, header, null);
    }

    @Override
    public V r(K key) throws PageException {
	int hash = hash(key);
	return segmentFor(hash).removeE(this, key, hash, null, header);
    }

    @Override
    public V r(K key, V defaultValue) {
	int hash = hash(key);
	return segmentFor(hash).remove(key, hash, null, header, defaultValue);
    }

    /**
     * {@inheritDoc}
     *
     * @throws NullPointerException if the specified key is null
     */
    @Override
    public boolean remove(Object key, Object value) {
	int hash = hash(key);
	if (value == null) return false;
	return segmentFor(hash).remove(key, hash, value, header, null) != null;
    }

    /**
     * {@inheritDoc}
     *
     * @throws NullPointerException if any of the arguments are null
     */
    @Override
    public boolean replace(K key, V oldValue, V newValue) {
	if (oldValue == null || newValue == null) throw new NullPointerException();
	int hash = hash(key);
	return segmentFor(hash).replace(key, hash, oldValue, newValue);
    }

    /**
     * {@inheritDoc}
     *
     * @return the previous value associated with the specified key, or <tt>null</tt> if there was no
     *         mapping for the key
     * @throws NullPointerException if the specified key or value is null
     */
    @Override
    public V replace(K key, V value) {
	if (value == null) throw new NullPointerException();
	int hash = hash(key);
	return segmentFor(hash).replace(key, hash, value);
    }

    /**
     * Removes all of the mappings from this map.
     */
    @Override
    public void clear() {
	for (int i = 0; i < segments.length; ++i)
	    segments[i].clear(header);
	header.before = header.after = header;
    }

    /**
     * Returns <tt>true</tt> if this map should remove its eldest entry. This method is invoked by
     * <tt>put</tt> and <tt>putAll</tt> after inserting a new entry into the map. It provides the
     * implementor with the opportunity to remove the eldest entry each time a new one is added. This is
     * useful if the map represents a cache: it allows the map to reduce memory consumption by deleting
     * stale entries.
     *
     * <p>
     * Sample use: this override will allow the map to grow up to 100 entries and then delete the eldest
     * entry each time a new entry is added, maintaining a steady state of 100 entries.
     * 
     * <pre>
     * private static final int MAX_ENTRIES = 100;
     *
     * protected boolean removeEldestEntry(Map.Entry eldest) {
     *     return size() > MAX_ENTRIES;
     * }
     * </pre>
     *
     * <p>
     * This method typically does not modify the map in any way, instead allowing the map to modify
     * itself as directed by its return value. It <i>is</i> permitted for this method to modify the map
     * directly, but if it does so, it <i>must</i> return <tt>false</tt> (indicating that the map should
     * not attempt any further modification). The effects of returning <tt>true</tt> after modifying the
     * map from within this method are unspecified.
     *
     * <p>
     * This implementation merely returns <tt>false</tt> (so that this map acts like a normal map - the
     * eldest element is never removed).
     *
     * @param eldest The least recently inserted entry in the map, or if this is an access-ordered map,
     *            the least recently accessed entry. This is the entry that will be removed it this
     *            method returns <tt>true</tt>. If the map was empty prior to the <tt>put</tt> or
     *            <tt>putAll</tt> invocation resulting in this invocation, this will be the entry that
     *            was just inserted; in other words, if the map contains a single entry, the eldest
     *            entry is also the newest.
     * @return <tt>true</tt> if the eldest entry should be removed from the map; <tt>false</tt> if it
     *         should be retained.
     */
    protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
	return false;
    }

    /**
     * Returns a {@link Set} view of the keys contained in this map. The set is backed by the map, so
     * changes to the map are reflected in the set, and vice-versa. The set supports element removal,
     * which removes the corresponding mapping from this map, via the <tt>Iterator.remove</tt>,
     * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. It
     * does not support the <tt>add</tt> or <tt>addAll</tt> operations.
     *
     * <p>
     * The view's <tt>iterator</tt> is a "weakly consistent" iterator that will never throw
     * {@link ConcurrentModificationException}, and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to) reflect any modifications
     * subsequent to construction.
     */
    @Override
    public Set<K> keySet() {
	Set<K> ks = keySet;
	return (ks != null) ? ks : (keySet = new KeySet());
    }

    /**
     * Returns a {@link Collection} view of the values contained in this map. The collection is backed
     * by the map, so changes to the map are reflected in the collection, and vice-versa. The collection
     * supports element removal, which removes the corresponding mapping from this map, via the
     * <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and
     * <tt>clear</tt> operations. It does not support the <tt>add</tt> or <tt>addAll</tt> operations.
     *
     * <p>
     * The view's <tt>iterator</tt> is a "weakly consistent" iterator that will never throw
     * {@link ConcurrentModificationException}, and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to) reflect any modifications
     * subsequent to construction.
     */
    @Override
    public Collection<V> values() {
	Collection<V> vs = values;
	return (vs != null) ? vs : (values = new Values());
    }

    /**
     * Returns a {@link Set} view of the mappings contained in this map. The set is backed by the map,
     * so changes to the map are reflected in the set, and vice-versa. The set supports element removal,
     * which removes the corresponding mapping from the map, via the <tt>Iterator.remove</tt>,
     * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. It
     * does not support the <tt>add</tt> or <tt>addAll</tt> operations.
     *
     * <p>
     * The view's <tt>iterator</tt> is a "weakly consistent" iterator that will never throw
     * {@link ConcurrentModificationException}, and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to) reflect any modifications
     * subsequent to construction.
     */
    @Override
    public Set<Map.Entry<K, V>> entrySet() {
	Set<Map.Entry<K, V>> es = entrySet;
	return (es != null) ? es : (entrySet = new EntrySet());
    }

    /**
     * Returns an enumeration of the keys in this table.
     *
     * @return an enumeration of the keys in this table
     * @see #keySet()
     */
    public Enumeration<K> keys() {
	return new KeyIterator();
    }

    /**
     * Returns an enumeration of the values in this table.
     *
     * @return an enumeration of the values in this table
     * @see #values()
     */
    public Enumeration<V> elements() {
	return new ValueIterator();
    }

    /* ---------------- Iterator Support -------------- */

    abstract class HashIterator {
	HashEntry<K, V> nextEntry = null;
	HashEntry<K, V> lastReturned = null;

	HashEntry<K, V> snapshotHeader = null;

	HashIterator() {
	    if (evictionPolicy.recordAccess(header, header) != null) snapshotHeader = header.cloneAll(header);
	    else snapshotHeader = header;

	    nextEntry = snapshotHeader.after;
	}

	public boolean hasMoreElements() {
	    return hasNext();
	}

	public boolean hasNext() {
	    return nextEntry != snapshotHeader;
	}

	HashEntry<K, V> nextEntry() {
	    if (nextEntry == snapshotHeader) throw new NoSuchElementException();
	    HashEntry<K, V> e = lastReturned = nextEntry;
	    nextEntry = e.after;

	    return e;
	}

	public void remove() {
	    if (lastReturned == null) throw new IllegalStateException();
	    ConcurrentLinkedHashMapPro.this.remove(lastReturned.key);
	    lastReturned = null;
	}

    }

    final class KeyIterator extends HashIterator implements Iterator<K>, Enumeration<K> {
	@Override
	public K next() {
	    return super.nextEntry().key;
	}

	@Override
	public K nextElement() {
	    return super.nextEntry().key;
	}
    }

    final class ValueIterator extends HashIterator implements Iterator<V>, Enumeration<V> {
	@Override
	public V next() {
	    return super.nextEntry().value;
	}

	@Override
	public V nextElement() {
	    return super.nextEntry().value;
	}
    }

    /**
     * Custom Entry class used by EntryIterator.next(), that relays setValue changes to the underlying
     * map.
     */
    final class WriteThroughEntry extends AbstractMap.SimpleEntry<K, V> implements Map.Entry<K, V> {

	private static final long serialVersionUID = 1573332674915851631L;

	WriteThroughEntry(K k, V v) {
	    super(k, v);
	}

	/**
	 * Set our entry's value and write through to the map. The value to return is somewhat arbitrary
	 * here. Since a WriteThroughEntry does not necessarily track asynchronous changes, the most recent
	 * "previous" value could be different from what we return (or could even have been removed in which
	 * case the put will re-establish). We do not and cannot guarantee more.
	 */
	@Override
	public V setValue(V value) {
	    if (value == null) throw new NullPointerException();
	    V v = super.setValue(value);
	    ConcurrentLinkedHashMapPro.this.put(getKey(), value);
	    return v;
	}
    }

    final class EntryIterator extends HashIterator implements Iterator<Map.Entry<K, V>> {
	@Override
	public Map.Entry<K, V> next() {
	    HashEntry<K, V> e = super.nextEntry();
	    return new WriteThroughEntry(e.key, e.value);
	}
    }

    final class KeySet extends AbstractSet<K> {
	@Override
	public Iterator<K> iterator() {
	    return new KeyIterator();
	}

	@Override
	public int size() {
	    return ConcurrentLinkedHashMapPro.this.size();
	}

	@Override
	public boolean isEmpty() {
	    return ConcurrentLinkedHashMapPro.this.isEmpty();
	}

	@Override
	public boolean contains(Object o) {
	    return ConcurrentLinkedHashMapPro.this.containsKey(o);
	}

	@Override
	public boolean remove(Object o) {
	    return ConcurrentLinkedHashMapPro.this.remove(o) != null;
	}

	@Override
	public void clear() {
	    ConcurrentLinkedHashMapPro.this.clear();
	}
    }

    final class Values extends AbstractCollection<V> {
	@Override
	public Iterator<V> iterator() {
	    return new ValueIterator();
	}

	@Override
	public int size() {
	    return ConcurrentLinkedHashMapPro.this.size();
	}

	@Override
	public boolean isEmpty() {
	    return ConcurrentLinkedHashMapPro.this.isEmpty();
	}

	@Override
	public boolean contains(Object o) {
	    return ConcurrentLinkedHashMapPro.this.containsValue(o);
	}

	@Override
	public void clear() {
	    ConcurrentLinkedHashMapPro.this.clear();
	}
    }

    final class EntrySet extends AbstractSet<Map.Entry<K, V>> {
	@Override
	public Iterator<Map.Entry<K, V>> iterator() {
	    return new EntryIterator();
	}

	@Override
	public boolean contains(Object o) {
	    if (!(o instanceof Map.Entry<?, ?>)) return false;
	    Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
	    V v = ConcurrentLinkedHashMapPro.this.get(e.getKey());
	    return v != null && v.equals(e.getValue());
	}

	@Override
	public boolean remove(Object o) {
	    if (!(o instanceof Map.Entry<?, ?>)) return false;
	    Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
	    return ConcurrentLinkedHashMapPro.this.remove(e.getKey(), e.getValue());
	}

	@Override
	public int size() {
	    return ConcurrentLinkedHashMapPro.this.size();
	}

	@Override
	public boolean isEmpty() {
	    return ConcurrentLinkedHashMapPro.this.isEmpty();
	}

	@Override
	public void clear() {
	    ConcurrentLinkedHashMapPro.this.clear();
	}
    }

    /* ---------------- Serialization Support -------------- */

    /**
     * Save the state of the <tt>ConcurrentHashMap</tt> instance to a stream (i.e., serialize it).
     * 
     * @param s the stream
     * @serialData the key (Object) and value (Object) for each key-value mapping, followed by a null
     *             pair. The key-value mappings are emitted in no particular order.
     */
    private void writeObject(java.io.ObjectOutputStream s) throws IOException {
	s.defaultWriteObject();

	for (int k = 0; k < segments.length; ++k) {
	    Segment<K, V> seg = segments[k];
	    seg.lock();
	    try {
		HashEntry<K, V>[] tab = seg.table;
		for (int i = 0; i < tab.length; ++i) {
		    for (HashEntry<K, V> e = tab[i]; e != null; e = e.next) {
			s.writeObject(e.key);
			s.writeObject(e.value);
		    }
		}
	    }
	    finally {
		seg.unlock();
	    }
	}
	s.writeObject(null);
	s.writeObject(null);
    }

    /**
     * Reconstitute the <tt>ConcurrentLinkedHashMap</tt> instance from a stream (i.e., deserialize it).
     * 
     * @param s the stream
     */
    private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
	s.defaultReadObject();

	// Initialize each segment to be minimally sized, and let grow.
	for (int i = 0; i < segments.length; ++i) {
	    segments[i].setTable(new HashEntry[1]);
	}

	// Read the keys and values, and put the mappings in the table
	for (;;) {
	    K key = (K) s.readObject();
	    V value = (V) s.readObject();
	    if (key == null) break;
	    put(key, value);
	}
    }

    public interface Entry<K, V> extends Map.Entry<K, V> {

	/**
	 * Returns the entry before this entry in the entry list.
	 */
	Entry<K, V> getBefore();

	/**
	 * Returns the entry after this entry in the entry list.
	 */
	Entry<K, V> getAfter();

	/**
	 * Returns the entry's access count.
	 */
	long getAccessCount();

	/**
	 * Returns the entry's creation time in milliseconds.
	 */
	long getCreationTime();

	/**
	 * Returns the entry's last access time in milliseconds.
	 */
	long getLastAccessTime();

    }
}
379559
public void copyKeys(Record recAlt, Record recMain, int iKeyArea)
    {
        BaseBuffer vector = new VectorBuffer(null);
        KeyArea keyMain = recMain.getKeyArea(iKeyArea);
        KeyArea keyAlt = recAlt.getKeyArea(iKeyArea);
        keyMain.setupKeyBuffer(vector, DBConstants.FILE_KEY_AREA);
        keyAlt.reverseKeyBuffer(vector, DBConstants.FILE_KEY_AREA);     // Move these keys back to the record
        vector.free();
    }
212938
function(rectangle) {
        return $.Rect.fromSummits(
            this.pointFromPixel(rectangle.getTopLeft(), true),
            this.pointFromPixel(rectangle.getTopRight(), true),
            this.pointFromPixel(rectangle.getBottomLeft(), true)
        );
    }
154220
function(rectangle) {
        var topLeft = this.viewport.pixelFromPointNoRotate(rectangle.getTopLeft(), true);
        var size = this.viewport.deltaPixelsFromPointsNoRotate(rectangle.getSize(), true);

        return new $.Rect(
            topLeft.x * $.pixelDensityRatio,
            topLeft.y * $.pixelDensityRatio,
            size.x * $.pixelDensityRatio,
            size.y * $.pixelDensityRatio
        );
    }
123927
public void copyFrom(StateSet other) {
        this.isTop = other.isTop;
        this.isBottom = other.isBottom;
        this.onExceptionPath = other.onExceptionPath;
        this.stateMap.clear();
        for (State state : other.stateMap.values()) {
            State dup = state.duplicate();
            this.stateMap.put(dup.getObligationSet(), dup);
        }
    }
1121210
@Override
	@Pure
	protected Rectangle2d calcBounds() {
		if (getPointCount() == 0) {
			return null;
		}

		final Iterator<Point2d> iterPoints = points().iterator();
		if (!iterPoints.hasNext()) {
			return null;
		}

		Point2d point = iterPoints.next();
		if (point == null) {
			return null;
		}

		double minx = point.getX();
		double maxx = point.getX();
		double miny = point.getY();
		double maxy = point.getY();

		while (iterPoints.hasNext()) {
			point = iterPoints.next();
			if (point != null) {
				final double x = point.getX();
				final double y = point.getY();
				if (x < minx) {
					minx = x;
				}
				if (y < miny) {
					miny = y;
				}
				if (x > maxx) {
					maxx = x;
				}
				if (y > maxy) {
					maxy = y;
				}
			}
		}
		final Rectangle2d r = new Rectangle2d();
		r.setFromCorners(minx, miny, maxx, maxy);
		return r;
	}