public class Service extends Object implements Validatable
Service typically represents a public transport service / line
In its minimal form it consists of a name.
equals(Object) returns true for instances set the same
content.
| Constructor and Description |
|---|
Service() |
| Modifier and Type | Method and Description |
|---|---|
static Service |
createMinimal(String name) |
boolean |
equals(Object obj) |
Map<String,Object> |
getAdditionalInfo() |
String |
getName() |
Optional<String> |
getTowards() |
int |
hashCode() |
Service |
setAdditionalInfo(Map<String,Object> additionalInfo) |
Service |
setName(String name) |
Service |
setTowards(String towards) |
String |
toString() |
void |
validate()
Checks if the instance is in a valid / useful state.
|
public String getName()
public Optional<String> getTowards()
public void validate()
ValidatableIllegalArgumentException including a description of the
invalid state is thrown.validate in interface ValidatableCopyright © 2018. All rights reserved.