ZoneRefusal

Why a zone would refuse a claim, as Zone.refusalFor answers it.

Three causes rather than one boolean, because the remedy differs and a modeller choosing between waiting, going elsewhere and giving up needs to know which it is. They are tested in this order, which is the order Zone.claim tests them in, so a zone that is both occupied and reserved reads as whichever would stop the claim first.

Entries

Link copied to clipboard

Something holds the zone outright -- a vehicle's body covers it, or a holder has been granted it. Asking for it is reasonable: it drains when the holder moves on or gives it back, unless nothing is scheduled to make that happen, which is what GuidedPathSpace.firstZoneHeldByStationaryVehicle is for.

Link copied to clipboard

Things are present in the zone without holding it -- a population. The zone empties when whatever admitted them takes them away, and nothing in the guide path governs that.

Link copied to clipboard

A closure has reserved the zone and does not admit this claimant. Asking for it as part of a new closure fails now and will keep failing until the reservation is taken up or given up, so this is the one refusal where waiting is usually the wrong answer -- see GuidedPathSpace.tryRequestZones and GuidedPathSpace.firstPromisedZone.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.