HeapSegment

public final class HeapSegment
extends Object implements Comparable<HeapSegment>

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.

הקפצת הודעות שגיאה (throw)
BufferUnderflowException אם hpsgData קטן מדי כדי להכיל את נתוני הכותרת של חתיכת ה-HPSG.

‫methods ציבוריים

הוספה

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