|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.realtime.SizeEstimator
This is a convenient class to help people figure out
how much memory the need. Instead of passing actual
numbers to the MemoryArea
constructors,
one can pass SizeEstimator
objects with
which you can have a better feel of how big a memory
area you require.
Field Summary | |
private long |
estimate
The estimated number of bytes neede to store all objects reserved. |
Constructor Summary | |
SizeEstimator()
|
Method Summary | |
long |
getEstimate()
Gets an estimate of the number of bytes needed to store all the objects reserved. |
static long |
objSize(java.lang.Class c)
|
void |
reserve(java.lang.Class c,
int n)
Take into account additional n instances of Class c
when estimating the size of the MemoryArea . |
void |
reserve(javax.realtime.SizeEstimator size)
Take into account an additional instance of SizeEstimator s
when estimating the size of the MemoryArea . |
void |
reserve(javax.realtime.SizeEstimator s,
int n)
Take into account additional n instances of SizeEstimator size
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 |
Field Detail |
private long estimate
Constructor Detail |
public SizeEstimator()
Method Detail |
public long getEstimate()
public void reserve(java.lang.Class c, int n)
n
instances of Class c
when estimating the size of the MemoryArea
.
c
- The class to take into account.n
- The number of instances of c
to estimate.public void reserve(javax.realtime.SizeEstimator size)
SizeEstimator s
when estimating the size of the MemoryArea
.
size
- The given instance of SizeEstimator
.public void reserve(javax.realtime.SizeEstimator s, int n)
n
instances of SizeEstimator size
when estimating the size of the MemoryArea
.
n
- The number of instances of size
to estimate.public static long objSize(java.lang.Class c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |