src/share/classes/java/awt/image/DataBufferDouble.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -152,11 +152,11 @@
* used as the banks of this <code>DataBuffer</code>.
* @param size The number of elements of each array to be used.
*/
public DataBufferDouble(double dataArray[][], int size) {
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length);
- bankdata = (double[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
/**
* Constructs a <code>double</code>-based <code>DataBuffer</code>
@@ -176,11 +176,11 @@
* @param size The number of elements of each array to be used.
* @param offsets An array of integer offsets, one for each bank.
*/
public DataBufferDouble(double dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length, offsets);
- bankdata = (double[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
/**
* Returns the default (first) <code>double</code> data array.
@@ -223,11 +223,11 @@
*
* @return all data arrays from this data buffer.
*/
public double[][] getBankData() {
theTrackable.setUntrackable();
- return (double[][]) bankdata.clone();
+ return bankdata.clone();
}
/**
* Returns the requested data array element from the first
* (default) bank as an <code>int</code>.