public class IdVersionString extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
id
Identifier part of the string.
|
static IdVersionString |
NULL_STRING
A NULL IdVersionString for exceptional cases.
|
static String |
NULL_STRING_RETURN |
protected VersionString |
version |
| Constructor and Description |
|---|
IdVersionString(String idv)
Returns a new id/version combined string.
|
IdVersionString(String id,
String version)
Returns a new id/version combined string.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getID()
Returns the identifier part of the string
|
VersionString |
getVersion()
Returns the version part of the string.
|
boolean |
sameAs(Object obj)
Tests if the parameter is the same id and version.
|
Map<String,String> |
toMap()
Returns the string as a map using the key "id" for the identifier part and the key "version" for the version part.
|
String |
toString() |
protected String id
protected VersionString version
public static String NULL_STRING_RETURN
public static IdVersionString NULL_STRING
public IdVersionString(String idv)
idv - input stringIllegalArgumentException - if the input string was null, empty or of wrong formatpublic IdVersionString(String id, String version)
id - identifier part of the stringversion - version part of the stringIllegalArgumentException - if the input string was null, empty or of wrong formatpublic String getID()
public VersionString getVersion()
public Map<String,String> toMap()
public boolean sameAs(Object obj)
obj - object to testCopyright © 2010–2017. All rights reserved.