frysk.debuginfo
Class Piece
java.lang.Object
frysk.debuginfo.Piece
- Direct Known Subclasses:
- MemoryPiece, RegisterPiece, UnavailablePiece
public abstract class Piece
- extends Object
Field Summary |
protected long |
size
|
Constructor Summary |
Piece(long size)
|
Method Summary |
abstract boolean |
equals(Object p)
Function that checks if the contents of two pieces are equal. |
protected abstract byte |
getByte(long index)
|
long |
getSize()
|
protected abstract void |
putByte(long index,
byte value)
|
void |
setSize(long size)
|
protected abstract Piece |
slice(long offset,
long length)
Function to slice a Piece - slices a piece from byte OFFSET
going for LENGTH bytes. |
protected abstract void |
toPrint(PrintWriter writer)
|
size
protected long size
Piece
public Piece(long size)
getSize
public long getSize()
setSize
public void setSize(long size)
slice
protected abstract Piece slice(long offset,
long length)
- Function to slice a Piece - slices a piece from byte OFFSET
going for LENGTH bytes.
- Parameters:
offset
- - byte position where slice should start fromlength
- - number of bytes to be sliced
- Returns:
- slice
getByte
protected abstract byte getByte(long index)
putByte
protected abstract void putByte(long index,
byte value)
toPrint
protected abstract void toPrint(PrintWriter writer)
equals
public abstract boolean equals(Object p)
- Function that checks if the contents of two pieces are equal.
- Overrides:
equals
in class Object
- Parameters:
p
- Piece to be compared with
- Returns:
- true/false