HeapSegment

public final class HeapSegment
extends Object

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


מתאר את הסוגים והמיקומים של אובייקטים בפלח של ערימה.

סיכום

כיתות במבנה היררכי

class HeapSegment.HeapSegmentElement

תיאור של אובייקט או אזור שמקודדים בנתוני HPSG. 

שדות

protected int mAllocationUnitCount

protected int mAllocationUnitSize

protected int mHeapId

protected int mOffset

protected long mStartAddress

protected ByteBuffer mUsageData

Constructors ציבוריים

HeapSegment(ByteBuffer hpsgData)

יוצרים HeapSegment חדש על סמך התוכן הגולמי של נתח HPSG.

‫methods ציבוריים

boolean append(HeapSegment other)

מוסיפים את התוכן של other למקטע הזה אם הוא מתאר את המקטע שמיד אחריו.

boolean canAppend(HeapSegment other)

בודקים אם 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()

בודקים אם הפלח הזה עדיין מכיל נתונים, ולא צורף לפלח אחר.

void rewindElements()
String toString()

שדות

mAllocationUnitCount

protected int mAllocationUnitCount

mAllocationUnitSize

protected int mAllocationUnitSize

mHeapId

protected int mHeapId

mOffset

protected int mOffset

mStartAddress

protected long mStartAddress

mUsageData

protected ByteBuffer mUsageData

Constructors ציבוריים

HeapSegment

public HeapSegment (ByteBuffer hpsgData)

יוצרים HeapSegment חדש על סמך התוכן הגולמי של נתח HPSG.

פרמטרים
hpsgData ByteBuffer: הנתונים הגולמיים מתוך נתח HPSG.

זריקות
אם hpsgData קטן מדי כדי להכיל את נתוני הכותרת של חתיכת ה-HPSG.

‫methods ציבוריים

פעולת append

public boolean append (HeapSegment other)

מוסיפים את התוכן של other לפלח הזה אם הוא מתאר את הפלח שמיד אחריו.

פרמטרים
other HeapSegment: הפלח שאליו יצורף הפלח הזה, אם אפשר. אם מצורף, other לא יהיה תקף כשהשיטה הזו תחזיר ערך.

החזרות
boolean ‫true אם other נוסף בהצלחה לפלח הזה.

canAppend

public boolean canAppend (HeapSegment other)

בודקים אם other מופיע מיד אחרי המקטע הזה.

פרמטרים
other HeapSegment: ה-HeapSegment שרוצים לבדוק.

החזרות
boolean true אם other מופיע מיד אחרי המקטע הזה.

compareTo

public int compareTo (HeapSegment other)

פרמטרים
other HeapSegment

החזרות
int

שווה

public boolean equals (Object o)

פרמטרים
o Object

החזרות
boolean

getEndAddress

public long getEndAddress ()

החזרות
long

getLength

public int getLength ()

החזרות
int

getNextElement

public HeapSegment.HeapSegmentElement getNextElement (HeapSegment.HeapSegmentElement reuse)

פרמטרים
reuse HeapSegment.HeapSegmentElement

החזרות
HeapSegment.HeapSegmentElement

getStartAddress

public long getStartAddress ()

החזרות
long

hashCode

public int hashCode ()

החזרות
int

isValid

public boolean isValid ()

בודקים אם הפלח הזה עדיין מכיל נתונים, ולא צורף לפלח אחר.

החזרות
boolean הערך הוא true אם הפלח הזה לא צורף לפלח אחר.

rewindElements

public void rewindElements ()

toString

public String toString ()

החזרות
String