Class BicycleRentalStation
The
BicycleRentalStation
is located somewhere and can hold IRentalBicycle
s
for rental.
Inheritance
System.Object
BicycleRentalStation
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SOHBicycleModel.Rental
Assembly: SOHBicycleModel.dll
Syntax
public class BicycleRentalStation : IVectorFeature, IQueryFieldProvider
Fields
| Improve this Doc View SourceStandardAmount
The
BicycleRentalStation
is located somewhere and can hold IRentalBicycle
s
for rental.
Declaration
public const int StandardAmount = 10
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceCount
Provides the amount of currently available bicycles at this station.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Empty
Indicates that there are no available bicycles at this rental station.
Declaration
public bool Empty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
The name of this (location of) rental station.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Position
The centroid of this rental station.
Declaration
public Position Position { get; }
Property Value
Type | Description |
---|---|
Position |
VectorStructured
The
BicycleRentalStation
is located somewhere and can hold IRentalBicycle
s
for rental.
Declaration
public VectorStructuredData VectorStructured { get; set; }
Property Value
Type | Description |
---|---|
VectorStructuredData |
Methods
| Improve this Doc View SourceEnter(IRentalBicycle)
Enter the parking spot with a bicycle and "consume" its required space.
Declaration
public bool Enter(IRentalBicycle bicycle)
Parameters
Type | Name | Description |
---|---|---|
IRentalBicycle | bicycle | The bicycle that is parked in this spot. |
Returns
Type | Description |
---|---|
System.Boolean | True if a parking spot could be found, false otherwise (Beware: the bicycle is not parked here). |
GetValue(String)
The
BicycleRentalStation
is located somewhere and can hold IRentalBicycle
s
for rental.
Declaration
public object GetValue(string field)
Parameters
Type | Name | Description |
---|---|---|
System.String | field |
Returns
Type | Description |
---|---|
System.Object |
Init(ILayer, VectorStructuredData)
The
BicycleRentalStation
is located somewhere and can hold IRentalBicycle
s
for rental.
Declaration
public void Init(ILayer layer, VectorStructuredData data)
Parameters
Type | Name | Description |
---|---|---|
ILayer | layer | |
VectorStructuredData | data |
Leave(IRentalBicycle)
Leave the parking spot with given bicycle.
Declaration
public bool Leave(IRentalBicycle bicycle)
Parameters
Type | Name | Description |
---|---|---|
IRentalBicycle | bicycle | The bicycle that leaves this spot. |
Returns
Type | Description |
---|---|
System.Boolean | True if bicycle is not on this parking space any more. |
RentAny()
Rents any available IRentalBicycle in this rental station.
Declaration
public IRentalBicycle RentAny()
Returns
Type | Description |
---|---|
IRentalBicycle | The rented bicycle, null if none is available. |
Synchronize()
Synchronizes all stored updates values with the current status.
Declaration
public void Synchronize()
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
Update(VectorStructuredData)
Initializes the
BicycleRentalStation
with the feature information.
Declaration
public void Update(VectorStructuredData data)
Parameters
Type | Name | Description |
---|---|---|
VectorStructuredData | data |