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 doubleDEFAULT_SPEED_EPSILONEpsilon margin when comparing speeds (km/h)
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddAccessMode(Mode mode)Add a new access mode to the groupAccessGroupPropertiesclone()Clone this instanceSet<Mode>getAccessModes()The access modes for this groupDoublegetCriticalSpeedKmH()Collect the critical speed in km/hdefault doublegetCriticalSpeedOrDefaultKmH(double defaultCriticalSpeed)Collect the critical speed set, or otherwise the provided defaultDoublegetMaximumSpeedKmH()Collect the maximum speed in km/hdefault doublegetMaximumSpeedOrDefaultKmH(double defaultMaximumSpeed)Collect the maximum speed set, or otherwise the provided defaultdefault booleanisCriticalSpeedKmHSet()Verify if a critical speed is set on this groupbooleanisEqualExceptForModes(AccessGroupProperties accessProperties)Verify if equal to given properties except for the allowed modesdefault booleanisMaximumSpeedKmHSet()Verify if a maximum speed is set on this groupbooleanremoveAccessMode(Mode toBeRemovedMode)Remove access modevoidsetCriticalSpeedKmH(Double criticalSpeedKmH)set the critical speed in km/hvoidsetMaximumSpeedKmH(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
-
-