Interface AccessGroupProperties
-
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
AccessGroupPropertiesImpl
public interface AccessGroupProperties extends Cloneable
Contains the properties of a mode 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
clone()
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
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/h
-
-
-
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
-
clone
AccessGroupProperties clone()
Clone this instance- Returns:
- 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
-
-