public static class INTargetRep.Default extends INTargetRep
INTargetRep.Default, INTargetRep.None, INTargetRep.Sparse, INTargetRep.TypeNONE| Constructor and Description |
|---|
Default(int capacity) |
Default(SizeofMarker marker) |
| Modifier and Type | Method and Description |
|---|---|
long |
calculateMemorySize()
Returns the current memory size of the underlying representation in
bytes.
|
INTargetRep |
compact(IN parent)
Chooses a more compact representation, if that's possible, otherwise
does nothing.
|
INTargetRep |
copy(int from,
int to,
int n,
IN parent)
Copies n elements at index denoted by "from" to the index denoted by
"to".
|
Node |
get(int idx)
Returns the element at idx.
|
INTargetRep.Type |
getType() |
INTargetRep.Default |
resize(int capacity)
Changes the capacity, either truncating existing elements at the end if
the capacity is reduced, or adding empty elements at the end if the
capacity is enlarged.
|
INTargetRep |
set(int idx,
Node node,
IN parent)
Sets the array element at idx to the node.
|
void |
updateCacheStats(boolean increment,
Evictor evictor)
Update the cache statistics for this representation.
|
public Default(int capacity)
public Default(SizeofMarker marker)
public INTargetRep.Default resize(int capacity)
INArrayRepresize in class INArrayRep<INTargetRep,INTargetRep.Type,Node>public INTargetRep.Type getType()
getType in class INArrayRep<INTargetRep,INTargetRep.Type,Node>public Node get(int idx)
INArrayRepget in class INArrayRep<INTargetRep,INTargetRep.Type,Node>public INTargetRep set(int idx, Node node, IN parent)
INArrayRepset in class INArrayRep<INTargetRep,INTargetRep.Type,Node>idx - the index to be setnode - the array elelement at the idxpublic INTargetRep copy(int from, int to, int n, IN parent)
INArrayRepcopy in class INArrayRep<INTargetRep,INTargetRep.Type,Node>from - the source (inclusive) of the copyto - the target (inclusive) of the copyn - the number of elements to be copied.public INTargetRep compact(IN parent)
INArrayRepWARNING: This method must not change the memory size of the current representation and return 'this', without explicitly adjusting memory usage (via noteRepChange) before returning. Returning a new instance is the trigger for adjusting memory usage in the parent.
compact in class INArrayRep<INTargetRep,INTargetRep.Type,Node>public long calculateMemorySize()
INArrayRepcalculateMemorySize in class INArrayRep<INTargetRep,INTargetRep.Type,Node>public void updateCacheStats(boolean increment,
Evictor evictor)
INArrayRepincrement - true the stat should be incremented, false if it must
be decrementedevictor - the evictor that shoulds ths stat countersCopyright © 2024. All rights reserved.