< prev index next >

src/java.base/share/classes/jdk/internal/foreign/abi/Storage.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package jdk.internal.foreign.abi;
  24 
  25 public class Storage {
  26     private final StorageClass storageClass;
  27     private final long storageIndex;
  28     private final long size;

  29 
  30     public Storage(StorageClass storageClass, long storageIndex, long size) {




  31         this.storageClass = storageClass;
  32         this.storageIndex = storageIndex;
  33         this.size = size;

  34     }
  35 
  36     public StorageClass getStorageClass() {
  37         return storageClass;
  38     }
  39 
  40     public long getStorageIndex() {
  41         return storageIndex;
  42     }
  43 
  44     public long getSize() {
  45         return size;




  46     }
  47 
  48     @Override
  49     public String toString() {
  50         return "Storage { " + storageClass + "[" + storageIndex + "] (size=" + size + ") }";
  51     }
  52 }


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package jdk.internal.foreign.abi;
  24 
  25 public class Storage {
  26     private final StorageClass storageClass;
  27     private final long storageIndex;
  28     private final long size;
  29     private final long maxSize;
  30 
  31     public Storage(StorageClass storageClass, long storageIndex, long size) {
  32         this(storageClass, storageIndex, size, size);
  33     }
  34 
  35     public Storage(StorageClass storageClass, long storageIndex, long size, long maxSize) {
  36         this.storageClass = storageClass;
  37         this.storageIndex = storageIndex;
  38         this.size = size;
  39         this.maxSize = maxSize;
  40     }
  41 
  42     public StorageClass getStorageClass() {
  43         return storageClass;
  44     }
  45 
  46     public long getStorageIndex() {
  47         return storageIndex;
  48     }
  49 
  50     public long getSize() {
  51         return size;
  52     }
  53 
  54     public long getMaxSize() {
  55         return maxSize;
  56     }
  57 
  58     @Override
  59     public String toString() {
  60         return "Storage { " + storageClass + "[" + storageIndex + "] (size=" + size + ") }";
  61     }
  62 }
< prev index next >