Change modifiers of IntBase from package-private to protected.

This commit is contained in:
Andy Nguyen 2021-11-11 21:09:52 +01:00
parent cdffd23f13
commit b995e5e3d5
6 changed files with 12 additions and 12 deletions

View File

@ -23,8 +23,8 @@ public class Buffer {
private final int size; private final int size;
public Buffer(int size) { public Buffer(int size) {
this.address = api.malloc(size);
this.size = size; this.size = size;
this.address = api.malloc(size);
} }
public void finalize() { public void finalize() {

View File

@ -23,7 +23,7 @@ public final class Int16 extends IntBase {
this.set(value); this.set(value);
} }
int elementSize() { protected int elementSize() {
return SIZE; return SIZE;
} }

View File

@ -23,7 +23,7 @@ public final class Int32 extends IntBase {
this.set(value); this.set(value);
} }
int elementSize() { protected int elementSize() {
return SIZE; return SIZE;
} }

View File

@ -23,7 +23,7 @@ public final class Int64 extends IntBase {
this.set(value); this.set(value);
} }
int elementSize() { protected int elementSize() {
return SIZE; return SIZE;
} }

View File

@ -23,7 +23,7 @@ public final class Int8 extends IntBase {
this.set(value); this.set(value);
} }
int elementSize() { protected int elementSize() {
return SIZE; return SIZE;
} }

View File

@ -8,7 +8,7 @@
package com.bdjb.api; package com.bdjb.api;
abstract class IntBase { abstract class IntBase {
static final API api; protected static final API api;
static { static {
try { try {
@ -18,23 +18,23 @@ abstract class IntBase {
} }
} }
final long address; protected final long address;
final int size; protected final int size;
final int[] dimensions; protected final int[] dimensions;
IntBase(int[] dimensions) { protected IntBase(int[] dimensions) {
this.dimensions = dimensions; this.dimensions = dimensions;
this.size = size(dimensions); this.size = size(dimensions);
this.address = api.malloc(size); this.address = api.malloc(size);
} }
IntBase() { protected IntBase() {
this(new int[] {1}); this(new int[] {1});
} }
abstract int elementSize(); protected abstract int elementSize();
public void finalize() { public void finalize() {
api.free(address); api.free(address);