Interface AccessGroupProperties
-
- All Known Implementing Classes:
AccessGroupPropertiesImpl
public interface AccessGroupProperties
Contains the properties of a mode group specific to a link segment type- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_SPEED_EPSILON
Epsilon margin when comparing speeds (km/h)
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addAccessMode(Mode mode)
Add a new access mode to the groupAccessGroupProperties
deepClone()
Deep clone this instanceSet<Mode>
getAccessModes()
The access modes for this groupDouble
getCriticalSpeedKmH()
Collect the critical speed in km/hdefault double
getCriticalSpeedOrDefaultKmH(double defaultCriticalSpeed)
Collect the critical speed set, or otherwise the provided defaultDouble
getMaximumSpeedKmH()
Collect the maximum speed in km/hdefault double
getMaximumSpeedOrDefaultKmH(double defaultMaximumSpeed)
Collect the maximum speed set, or otherwise the provided defaultdefault boolean
hasAccessModes()
Verify if group supports one or more access modesdefault boolean
isCriticalSpeedKmHSet()
Verify if a critical speed is set on this groupboolean
isEqualExceptForModes(AccessGroupProperties accessProperties)
Verify if equal to given properties except for the allowed modesdefault boolean
isMaximumSpeedKmHSet()
Verify if a maximum speed is set on this groupboolean
removeAccessMode(Mode toBeRemovedMode)
Remove access modevoid
setCriticalSpeedKmH(Double criticalSpeedKmH)
set the critical speed in km/hvoid
setMaximumSpeedKmH(Double maxSpeedKmH)
set the maximum speed in km/hAccessGroupProperties
shallowClone()
Shallow clone this instance
-
-
-
Field Detail
-
DEFAULT_SPEED_EPSILON
static final double DEFAULT_SPEED_EPSILON
Epsilon margin when comparing speeds (km/h)- See Also:
- Constant Field Values
-
-
Method Detail
-
getMaximumSpeedKmH
Double getMaximumSpeedKmH()
Collect the maximum speed in km/h- Returns:
- the maximum speed in km/h
-
isMaximumSpeedKmHSet
default boolean isMaximumSpeedKmHSet()
Verify if a maximum speed is set on this group- Returns:
- true when set, false otherwise
-
getMaximumSpeedOrDefaultKmH
default double getMaximumSpeedOrDefaultKmH(double defaultMaximumSpeed)
Collect the maximum speed set, or otherwise the provided default- Parameters:
defaultMaximumSpeed
- to use- Returns:
- maximum speed
-
setMaximumSpeedKmH
void setMaximumSpeedKmH(Double maxSpeedKmH)
set the maximum speed in km/h- Parameters:
maxSpeedKmH
- to set
-
getCriticalSpeedKmH
Double getCriticalSpeedKmH()
Collect the critical speed in km/h- Returns:
- the critical speed in km/h
-
isCriticalSpeedKmHSet
default boolean isCriticalSpeedKmHSet()
Verify if a critical speed is set on this group- Returns:
- true when set, false otherwise
-
getCriticalSpeedOrDefaultKmH
default double getCriticalSpeedOrDefaultKmH(double defaultCriticalSpeed)
Collect the critical speed set, or otherwise the provided default- Parameters:
defaultCriticalSpeed
- to use- Returns:
- critical speed
-
setCriticalSpeedKmH
void setCriticalSpeedKmH(Double criticalSpeedKmH)
set the critical speed in km/h- Parameters:
criticalSpeedKmH
- to set
-
shallowClone
AccessGroupProperties shallowClone()
Shallow clone this instance- Returns:
- shallow copy of this instance
-
deepClone
AccessGroupProperties deepClone()
Deep clone this instance- Returns:
- deep copy of this instance
-
removeAccessMode
boolean removeAccessMode(Mode toBeRemovedMode)
Remove access mode- Parameters:
toBeRemovedMode
- the to be removed mode- Returns:
- true when success, false otherwise
-
isEqualExceptForModes
boolean isEqualExceptForModes(AccessGroupProperties accessProperties)
Verify if equal to given properties except for the allowed modes- Parameters:
accessProperties
- to compare against- Returns:
- true when deemed equal, false otherwise
-
addAccessMode
void addAccessMode(Mode mode)
Add a new access mode to the group- Parameters:
mode
- to add
-
hasAccessModes
default boolean hasAccessModes()
Verify if group supports one or more access modes- Returns:
- true when one or more modes are supported, false otherwise
-
-