public final class LibraryAddressUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONSTANT_CLOSE_PARENTHESIS |
static String |
CONSTANT_COMA |
static String |
CONSTANT_MULTI_SPACE |
static String |
CONSTANT_ONE_SPACE |
static String |
CONSTANT_OPEN_PARENTHESIS |
static String |
VALID_GEOMETRY_REGEX |
Modifier and Type | Method and Description |
---|---|
static void |
fillAddressGeolocation(Adresse adresse,
String strGeometry)
Fills the address with x and y geolocation using strGeometry.
|
static boolean |
isTerminateByApostrophe(String strTypeVoie)
Test strTypeVoie is termitate by a value of list strListValuesTerminator
|
static String |
normalizeAddress(Adresse adresse)
String representation of the adresse
|
static int |
parseInt(String strValue)
Parse a long
|
static int |
parseInt(String strValue,
int nDefaultValue)
Parse a long
|
static long |
parseLong(String strValue)
Parse a long
|
static long |
parseLong(String strValue,
long nDefaultValue)
Parse a long
|
static String |
removeMultiSpace(String strChaine)
Replace a sequence of space by one space
|
public static final String CONSTANT_COMA
public static final String CONSTANT_MULTI_SPACE
public static final String CONSTANT_ONE_SPACE
public static final String CONSTANT_OPEN_PARENTHESIS
public static final String CONSTANT_CLOSE_PARENTHESIS
public static final String VALID_GEOMETRY_REGEX
public static String removeMultiSpace(String strChaine)
strChaine
- the chainepublic static boolean isTerminateByApostrophe(String strTypeVoie)
strTypeVoie
- the type voie to testpublic static long parseLong(String strValue)
strValue
- the value to parsestrValue
, -1
otherwise.public static long parseLong(String strValue, long nDefaultValue)
strValue
- the value to parsenDefaultValue
- the default valuestrValue
, nDefaultValue
otherwise.public static int parseInt(String strValue)
strValue
- the value to parsestrValue
, -1
otherwise.public static int parseInt(String strValue, int nDefaultValue)
strValue
- the value to parsenDefaultValue
- the default valuestrValue
, nDefaultValue
otherwise.public static void fillAddressGeolocation(Adresse adresse, String strGeometry)
POINT (123.456789 987.654321)
will give x = 123.456789
and y = 987.654321
.
Set x and y to 0 if x or y is not a number.adresse
- the address to fillstrGeometry
- the geometry stringCopyright © 2018 City of Paris. All rights reserved.