|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.livescribe.afp.PageAddress
public class PageAddress
This class encapsulates the physical address of a page of the Anoto dot space. In human-readable form, this unique address is a segmented number, composed of positive integers that identify the section, segment, shelf, book, and page. Sections contain multiple segments, segments contain multiple shelves, etc.
There is a method, toPageAddress(int, int, int, int), for
converting a segmented address (passed as individual integers) to a
long value. That value can then be passed to other methods in
this class.
| Constructor Summary | |
|---|---|
PageAddress(long pageAddress)
Constructs a new page address from the given 64-bit value. |
|
| Method Summary | |
|---|---|
PageInstance |
getPageInstance()
Gets the PageInstance for this page address. |
static PageInstance |
getPageInstance(long pageAddress)
Gets the PageInstance for the specified 64-bit page address. |
static long |
toPageAddress(int segment,
int shelf,
int book,
int page)
Converts a segmented page address into a 64-bit long
value. |
static long |
toPageAddress(String value)
Converts the string representation of a page address into a 64-bit value. |
String |
toString()
Returns a formatted string representation of this page address. |
static String |
toString(long pageAddress)
Gets a formatted string representation of the given 64-bit page address. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PageAddress(long pageAddress)
pageAddress - the 64-bit page address| Method Detail |
|---|
public PageInstance getPageInstance()
PageInstance for this page address. This returns
null if there is no paper definition for this page
address.
PageInstance object, or
null if there is no paper definition for this
address.getPageInstance(long)public String toString()
toString in class ObjecttoString(long)public static String toString(long pageAddress)
pageAddress - the 64-bit page address
public static long toPageAddress(int segment,
int shelf,
int book,
int page)
long
value. The value returned by this method can be passed to the
PageAddress(long) constructor or to
getPageInstance(long).
Note that the section (the top 12 bits) is considered to be zero.
segment - the segmentshelf - the shelfbook - the bookpage - the page
public static PageInstance getPageInstance(long pageAddress)
PageInstance for the specified 64-bit page address.
This returns null if there is no paper definition for the
address.
pageAddress - the 64-bit page address
PageInstance object, or
null if there is no paper definition for this
address.public static long toPageAddress(String value)
This returns -1 if the value is null or is not formatted
correctly.
value - the string-formatted page address
toString(long)
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||