restrictions property

Set<RouteRestrictionType> get restrictions

Set of RouteRestrictionType values that apply to this turn.

Returns

  • Set<RouteRestrictionType>: Restrictions for the turn; empty when there are no restrictions on the turn.

See also:

Implementation

Set<RouteRestrictionType> get restrictions {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'TurnDetails',
    'getRestrictions',
  );

  final int mask = resultString['result'];
  final Set<RouteRestrictionType> result = <RouteRestrictionType>{};
  for (final RouteRestrictionType value in RouteRestrictionType.values) {
    if (mask & value.id != 0) {
      result.add(value);
    }
  }
  return result;
}