org.schwa.dr
Class ByteSlice

java.lang.Object
  extended by org.schwa.dr.ByteSlice

public class ByteSlice
extends Object

A slice over bytes in the docrep Java API. This was chosen to not be a subclass of Slice so that we can guarentee byte values will always fit into the wrapped data type (a long in the case of Java).

Slices in the Java API are [inclusive, inclusive] unlike the C++ and Python APIs, which are [inclusive, exclusive).

Author:
Tim Dawborn

Field Summary
 long start
          The inclusive starting point of the slice.
 long stop
          The inclusive stopping point of the slice.
 
Constructor Summary
ByteSlice()
           
ByteSlice(long start, long stop)
           
 
Method Summary
 boolean equals(Object o)
           
 long getStart()
           
 long getStop()
           
 int hashCode()
           
 void setStart(long start)
           
 void setStop(long stop)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

public long start
The inclusive starting point of the slice.


stop

public long stop
The inclusive stopping point of the slice.

Constructor Detail

ByteSlice

public ByteSlice()

ByteSlice

public ByteSlice(long start,
                 long stop)
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getStart

public long getStart()

getStop

public long getStop()

setStart

public void setStart(long start)

setStop

public void setStop(long stop)


Copyright © 2014. All rights reserved.