@Valid public class Leg extends Object implements com.anaptecs.jeaf.core.api.ServiceObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Leg.Builder
Class implements builder to create a new instance of class
Leg. |
| Modifier | Constructor and Description |
|---|---|
protected |
Leg()
Default constructor is only intended to be used for deserialization by tools like Jackson for JSON.
|
protected |
Leg(Leg.Builder pBuilder)
Initialize object using the passed builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToStopovers(Collection<PlaceRef> pStopovers)
Method adds all passed objects to
stopovers. |
void |
addToStopovers(PlaceRef pStopovers)
Method adds the passed object to
stopovers. |
static Leg.Builder |
builder()
Method returns a new builder.
|
static Leg.Builder |
builder(Leg pObject)
Method creates a new builder and initialize it with the data from the passed object.
|
static Leg.Builder |
builder(PlaceRef pStart,
PlaceRef pStop)
Method creates a new builder and initializes it with the passed attributes.
|
void |
clearStopovers()
Method removes all objects from
stopovers. |
PlaceRef |
getStart()
Method returns association
start. |
PlaceRef |
getStop()
Method returns association
stop. |
List<PlaceRef> |
getStopovers()
Method returns association
stopovers. |
void |
removeFromStopovers(PlaceRef pStopovers)
Method removes the passed object from
stopovers. |
void |
setStart(PlaceRef pStart)
Method sets association
start. |
void |
setStop(PlaceRef pStop)
Method sets association
stop. |
String |
toString()
Method creates a new String with the values of all attributes of this class.
|
StringBuilder |
toStringBuilder(String pIndent)
Method returns a StringBuilder that can be used to create a String representation of this object.
|
void |
unsetStart()
Method unsets
start. |
void |
unsetStop()
Method unsets
stop. |
protected Leg()
protected Leg(Leg.Builder pBuilder)
pBuilder - Builder that should be used to initialize this object. The parameter must not be null.public static Leg.Builder builder()
Leg.Builder New builder that can be used to create new Leg objects.public static Leg.Builder builder(Leg pObject)
pObject - Object that should be used to initialize the builder. The parameter may be null.Leg.Builder New builder that can be used to create new Leg objects. The method never returns null.public static Leg.Builder builder(PlaceRef pStart, PlaceRef pStop)
public void setStart(PlaceRef pStart)
start.pStart - Value to which start should be set.public final void unsetStart()
start.public void setStop(PlaceRef pStop)
stop.pStop - Value to which stop should be set.public final void unsetStop()
stop.public List<PlaceRef> getStopovers()
stopovers.List Value to which stopovers is set. The method never returns null and the
returned collection is modifiable.public void addToStopovers(PlaceRef pStopovers)
stopovers.pStopovers - Object that should be added to stopovers. The parameter must not be null.public void addToStopovers(Collection<PlaceRef> pStopovers)
stopovers.pStopovers - Collection with all objects that should be added to stopovers. The parameter must not be
null.public void removeFromStopovers(PlaceRef pStopovers)
stopovers.pStopovers - Object that should be removed from stopovers. The parameter must not be null.public void clearStopovers()
stopovers.public StringBuilder toStringBuilder(String pIndent)
StringBuilder StringBuilder representing this object. The method never returns null.Copyright © 2023. All rights reserved.