HeapSegment

public final class HeapSegment
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.server.HeapSegment


Descrive i tipi e le posizioni degli oggetti in un segmento di un heap.

Riepilogo

Classi nidificate

class HeapSegment.HeapSegmentElement

Descrive un oggetto/regione codificato nei dati HPSG. 

Campi

protected int mAllocationUnitCount

protected int mAllocationUnitSize

protected int mHeapId

protected int mOffset

protected long mStartAddress

protected ByteBuffer mUsageData

Costruttori pubblici

HeapSegment(ByteBuffer hpsgData)

Crea un nuovo HeapSegment basato sui contenuti non elaborati di un blocco HPSG.

Metodi pubblici

boolean append(HeapSegment other)

Aggiungi i contenuti di other a questo segmento se descrive il segmento immediatamente successivo.

boolean canAppend(HeapSegment other)

Controlla se other segue immediatamente questo segmento.

int compareTo(HeapSegment other)
boolean equals(Object o)
long getEndAddress()
int getLength()
HeapSegment.HeapSegmentElement getNextElement(HeapSegment.HeapSegmentElement reuse)
long getStartAddress()
int hashCode()
boolean isValid()

Verifica se questo segmento contiene ancora dati e non è stato aggiunto a un altro segmento.

void rewindElements()
String toString()

Campi

mAllocationUnitCount

protected int mAllocationUnitCount

mAllocationUnitSize

protected int mAllocationUnitSize

mHeapId

protected int mHeapId

mOffset

protected int mOffset

mStartAddress

protected long mStartAddress

mUsageData

protected ByteBuffer mUsageData

Costruttori pubblici

HeapSegment

public HeapSegment (ByteBuffer hpsgData)

Crea un nuovo HeapSegment basato sui contenuti non elaborati di un blocco HPSG.

Parametri
hpsgData ByteBuffer: I dati non elaborati di un blocco HPSG.

Lanci
se hpsgData è troppo piccolo per contenere i dati dell'intestazione del blocco HPSG.

Metodi pubblici

aggiungi

public boolean append (HeapSegment other)

Aggiungi i contenuti di other a questo segmento se descrive il segmento immediatamente successivo.

Parametri
other HeapSegment: il segmento da aggiungere a questo segmento, se possibile. Se viene aggiunto, other non sarà valido quando questo metodo restituisce un valore.

Ritorni
boolean true se other è stato aggiunto correttamente a questo segmento.

canAppend

public boolean canAppend (HeapSegment other)

Controlla se other segue immediatamente questo segmento.

Parametri
other HeapSegment: il segmento heap da controllare.

Ritorni
boolean true se other segue immediatamente questo segmento.

compareTo

public int compareTo (HeapSegment other)

Parametri
other HeapSegment

Ritorni
int

uguale

public boolean equals (Object o)

Parametri
o Object

Ritorni
boolean

getEndAddress

public long getEndAddress ()

Ritorni
long

getLength

public int getLength ()

Ritorni
int

getNextElement

public HeapSegment.HeapSegmentElement getNextElement (HeapSegment.HeapSegmentElement reuse)

Parametri
reuse HeapSegment.HeapSegmentElement

Ritorni
HeapSegment.HeapSegmentElement

getStartAddress

public long getStartAddress ()

Ritorni
long

hashCode

public int hashCode ()

Ritorni
int

isValid

public boolean isValid ()

Verifica se questo segmento contiene ancora dati e non è stato aggiunto a un altro segmento.

Ritorni
boolean true se questo segmento non è stato aggiunto a un altro segmento.

rewindElements

public void rewindElements ()

toString

public String toString ()

Ritorni
String