HeapSegment

public final class HeapSegment
extends Object implements Comparable<HeapSegment>

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


Opisuje typy i lokalizacje obiektów w segmencie sterty.

Podsumowanie

Zagnieżdżone klasy

class HeapSegment.HeapSegmentElement

Opisuje obiekt lub region zakodowany w danych HPSG. 

Pola

protected int mAllocationUnitCount

protected int mAllocationUnitSize

protected int mHeapId

protected int mOffset

protected long mStartAddress

protected ByteBuffer mUsageData

Konstruktory publiczne

HeapSegment(ByteBuffer hpsgData)

Utwórz nowy obiekt HeapSegment na podstawie surowej zawartości fragmentu HPSG.

Metody publiczne

boolean append(HeapSegment other)

Dołącz zawartość other do tego segmentu, jeśli opisuje on segment bezpośrednio po nim.

boolean canAppend(HeapSegment other)

Sprawdź, czy po tym segmencie występuje znak other.

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

Sprawdź, czy ten segment nadal zawiera dane i czy nie został dołączony do innego segmentu.

void rewindElements()
String toString()

Pola

mAllocationUnitCount

protected int mAllocationUnitCount

mAllocationUnitSize

protected int mAllocationUnitSize

mHeapId

protected int mHeapId

mOffset

protected int mOffset

mStartAddress

protected long mStartAddress

mUsageData

protected ByteBuffer mUsageData

Konstruktory publiczne

HeapSegment

public HeapSegment (ByteBuffer hpsgData)

Utwórz nowy obiekt HeapSegment na podstawie surowej zawartości fragmentu HPSG.

Parametry
hpsgData ByteBuffer: nieprzetworzone dane z fragmentu HPSG.

Zgłasza
BufferUnderflowException jeśli hpsgData jest zbyt mały, aby pomieścić dane nagłówka fragmentu HPSG.

Metody publiczne

dołączanie

public boolean append (HeapSegment other)

Dołącz zawartość other do tego segmentu, jeśli opisuje on segment bezpośrednio po nim.

Parametry
other HeapSegment: segment, który można dołączyć do tego segmentu. Jeśli zostanie dołączony, po zwróceniu przez tę metodę będzie nieprawidłowy.other

Zwraca
boolean wartość true, jeśli wartość other została pomyślnie dodana do tego segmentu.

canAppend

public boolean canAppend (HeapSegment other)

Sprawdź, czy po tym segmencie występuje znak other.

Parametry
other HeapSegment: segment sterty do sprawdzenia.

Zwraca
boolean wartość true, jeśli other występuje bezpośrednio po tym segmencie.

compareTo

public int compareTo (HeapSegment other)

Parametry
other HeapSegment

Zwraca
int

równa się

public boolean equals (Object o)

Parametry
o Object

Zwraca
boolean

getEndAddress

public long getEndAddress ()

Zwraca
long

getLength

public int getLength ()

Zwraca
int

getNextElement

public HeapSegment.HeapSegmentElement getNextElement (HeapSegment.HeapSegmentElement reuse)

Parametry
reuse HeapSegment.HeapSegmentElement

Zwraca
HeapSegment.HeapSegmentElement

getStartAddress

public long getStartAddress ()

Zwraca
long

hashCode

public int hashCode ()

Zwraca
int

isValid

public boolean isValid ()

Sprawdź, czy ten segment nadal zawiera dane i czy nie został dołączony do innego segmentu.

Zwraca
boolean wartość true, jeśli ten segment nie został dołączony do innego segmentu.

rewindElements

public void rewindElements ()

toString

public String toString ()

Zwraca
String