gov.nasa.gsfc.drl.rtstps.core.fs
Class Location

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.fs.Location
All Implemented Interfaces:
java.lang.Comparable<Location>

 class Location
extends java.lang.Object
implements java.lang.Comparable<Location>

This simple class contains byte and bit location information within a byte array.


Field Summary
(package private)  int bit
          A bit offset into a byte.
(package private)  int offset
          A byte offset into an array.
 
Constructor Summary
Location(int offset, int bit)
          Create a Location object.
 
Method Summary
 int compareTo(Location o)
          Compare two locations.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

offset

int offset
A byte offset into an array.


bit

int bit
A bit offset into a byte.

Constructor Detail

Location

Location(int offset,
         int bit)
Create a Location object.

Method Detail

compareTo

public int compareTo(Location o)
Compare two locations.

Specified by:
compareTo in interface java.lang.Comparable<Location>
Returns:
A positive value if this location is after the passed location, A negative value if this location is before the passed location, and zero if they are equal.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object