@Entity public class DefaultSourceCoordinate extends AbstractCoordinate
AbstractCoordinate with TravelType, specialized to be used as a target.| Constructor and Description |
|---|
DefaultSourceCoordinate() |
DefaultSourceCoordinate(String id,
double x,
double y)
Generate Source coordinate with ID, X and Y values with no travel type.
|
DefaultSourceCoordinate(String id,
double x,
double y,
TravelType travelType)
Generate Source coordinate with a TravelType as well as ID, X and Y values.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
long |
getIdentifier()
The main problem with this identifier is that we need it for hibernate
since it's not able to work without an ID.
|
TravelType |
getTravelType()
Get travel type configuration for the source coordinate.
|
int |
hashCode() |
void |
setIdentifier(long id) |
void |
setTravelType(TravelType travelType)
Specify a travel type for the source coordinate.
|
String |
toString()
Returns a JSON String representation of the Coordinate with ID, x and y values.
|
public DefaultSourceCoordinate()
public DefaultSourceCoordinate(String id, double x, double y, TravelType travelType)
id - ID to associate with the target coordinatex - X value of targety - Y value of targettravelType - TravelType to be associated with the coordinatepublic DefaultSourceCoordinate(String id, double x, double y)
id - ID to associate with the target coordinatex - X value of targety - Y value of targetpublic TravelType getTravelType()
getTravelType in interface CoordinategetTravelType in class AbstractCoordinatepublic long getIdentifier()
public void setIdentifier(long id)
public void setTravelType(TravelType travelType)
setTravelType in interface CoordinatesetTravelType in class AbstractCoordinatetravelType - TravelType to be associated with the source coordinate.public String toString()
AbstractCoordinatetoString in class AbstractCoordinatepublic boolean equals(Object o)
equals in class AbstractCoordinatepublic int hashCode()
hashCode in class AbstractCoordinateCopyright © 2017. All rights reserved.