|
Jamaica 6.4 release 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.realtime.SizeEstimator
public final class SizeEstimator
Jamaica Real-Time Specification for Java class SizeEstimator.
This class permits to estimate the memory required for the allocation of Java objects and arrays. It determines a lower bound for the memory required to allocate all instances and arrays function reserve() will be called for.
| Constructor Summary | |
|---|---|
SizeEstimator()
Constructor to create estimate with no entries. |
|
| Method Summary | |
|---|---|
long |
getEstimate()
getEstimate returns the current estimate in number of bytes. |
void |
reserve(Class<?> clazz,
int num)
reserve reserves space for num instances of class clazz. |
void |
reserve(SizeEstimator size)
reserve reserves space for the memory reserved by SizeEstimator size. |
void |
reserve(SizeEstimator size,
int num)
reserve reserves space for the num times the memory reserved by SizeEstimator size. |
void |
reserveArray(int length)
reserveArray reserves space for an instance of a reference array of given length. |
void |
reserveArray(int length,
Class type)
reserveArray reserves space for an of an array of primitive type and length elements when estimating the size of the MemoryArea. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SizeEstimator()
| Method Detail |
|---|
public long getEstimate()
public void reserve(Class<?> clazz,
int num)
clazz - the class of the new instancesnum - the number of instances.
IllegalArgumentException - if clazz is null or num is
negative.public void reserve(SizeEstimator size)
size - another SizeEstimator.
IllegalArgumentException - if size is null.
public void reserve(SizeEstimator size,
int num)
size - another SizeEstimator.num - factor to multiply the space from size with.
IllegalArgumentException - if size is null or num < 0.public void reserveArray(int length)
length - the length of the reference array we want to
reserve space for.
IllegalArgumentException - if length < 0.
public void reserveArray(int length,
Class type)
length - the length of the primitive array we want to
reserve space for.type - the primitive element type, must be one of
Boolean.TYPE, Byte.TYPE, Short.TYPE, Character.TYPE,
Integer.Type, Float.TYPE, Long.TYPE, or Double.TYPE.
IllegalArgumentException - iff length is negative or type
is not a primitive element type.
|
Jamaica 6.4 release 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||