|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.imgfmt.app.Label
public class Label
Labels are used for names of roads, points of interest etc. There are different storage formats. 1. A 6 bit compact uppercase ascii format, that has escape codes for some special characters. 2. An 8 bit format. This seems to be a fairly straightforward latin-1 like encoding with no tricks to reduce the amount of space required.
Constructor Summary | |
---|---|
Label(java.lang.String text)
|
Method Summary | |
---|---|
int |
compareTo(Label other)
Note: this class has a natural ordering that is inconsistent with equals. |
boolean |
equals(java.lang.Object o)
|
int |
getLength()
|
int |
getOffset()
The offset of this label in the LBL file. |
java.lang.String |
getText()
|
java.lang.String |
getTextSansGarminCodes()
|
int |
hashCode()
|
void |
setOffset(int offset)
|
static java.lang.String |
squashSpaces(java.lang.String s)
|
static java.lang.String |
stripGarminCodes(java.lang.String s)
|
java.lang.String |
toString()
String version of the label, for diagnostic purposes. |
void |
write(ImgFileWriter writer,
CharacterEncoder textEncoder)
Write this label to the given img file. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Label(java.lang.String text)
Method Detail |
---|
public int getLength()
public java.lang.String getText()
public java.lang.String getTextSansGarminCodes()
public static java.lang.String stripGarminCodes(java.lang.String s)
public static java.lang.String squashSpaces(java.lang.String s)
public int getOffset()
public void setOffset(int offset)
public void write(ImgFileWriter writer, CharacterEncoder textEncoder)
writer
- The LBL file to write to.textEncoder
- The encoder to use for this text. Converts the
unicode string representation to the correct byte stream for the file.
This depends on encoding format, character set etc.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(Label other)
compareTo
in interface java.lang.Comparable<Label>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |