Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java
index f9fe71143..9f370c159 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,38 +18,38 @@ import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.debug.core.model.MemoryByte;
public class MemorySegment extends PlatformObject {
-
+
private BigInteger fAddress;
private BigInteger fEndAddress;
private MemoryByte[] fBytes;
private int fNumAddressableUnits;
-
+
public MemorySegment(BigInteger address, MemoryByte[] bytes, int numAddressableUnits)
{
fAddress = address;
fBytes = bytes;
fNumAddressableUnits = numAddressableUnits;
}
-
+
public BigInteger getAddress() {
return fAddress;
}
-
+
public MemoryByte[] getBytes() {
return fBytes;
}
-
+
public int getNumAddressableUnits() {
return fNumAddressableUnits;
}
-
+
public boolean containsAddress(BigInteger address)
{
if (getAddress().compareTo(address) <= 0 && getEndAddress().compareTo(address) >= 0)
return true;
return false;
}
-
+
public BigInteger getEndAddress()
{
if (fEndAddress == null)
@@ -58,7 +58,7 @@ public class MemorySegment extends PlatformObject {
}
return fEndAddress;
}
-
+
/**
* @param start - zero-based start offset
* @param length - number of bytes to get
@@ -68,17 +68,17 @@ public class MemorySegment extends PlatformObject {
{
if (start < 0)
return new MemoryByte[0];
-
+
if (start + length > fBytes.length)
return new MemoryByte[0];
-
+
ArrayList<MemoryByte> ret = new ArrayList<MemoryByte>();
-
+
for (int i=start; i< start+length; i++)
{
ret.add(fBytes[i]);
}
return ret.toArray(new MemoryByte[ret.size()]);
}
-
+
}

Back to the top