Budget

public enum Budget : CustomStringConvertible, Hashable

Budget for determining maximum range which can be traveled.

  • A fuel budget.

    Declaration

    Swift

    case fuel(volume: Measurement<UnitVolume>)

    Parameters

    volume

    The fuel volume, e.g. in liters.

  • An energy budget.

    Declaration

    Swift

    case energy(amount: Measurement<UnitEnergy>)

    Parameters

    amount

    The electric energy to be used, e.g. in kilowatt hours.

  • A time budget.

    Declaration

    Swift

    case time(duration: Measurement<UnitDuration>)

    Parameters

    duration

    The amount of time that may be used.

  • A distance budget.

    Declaration

    Swift

    case distance(length: Measurement<UnitLength>)

    Parameters

    length

    The maximum distance that may be travelled.

  • Description of the budget.

    Declaration

    Swift

    public var description: String { get }

    Return Value

    A string description of the budget.

  • Compare with another budget to determine if they are the same case.

    Declaration

    Swift

    public func sameCase(other: Budget) -> Bool

    Parameters

    other

    Another budget to compare with.

    Return Value

    A boolean value indicating whether the two budgets are the same case.