Package core.components
Class Bicycle
- java.lang.Object
-
- core.components.Bicycle
-
- Direct Known Subclasses:
ElectricalBicycle
,MechanicalBicycle
public abstract class Bicycle extends java.lang.Object
The (abstract) Bicycle class : It defines a bicycle on the application
-
-
Constructor Summary
Constructors Constructor Description Bicycle()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
equals method for the Bicycle classint
getId()
getter for idstatic int
getNumberOfBicycles()
getter for numberOfBicyclesint
hashCode()
hashCode method for the Bicycle classjava.lang.String
toString()
the toString method for the Bicycle class with some representation for the class
-
-
-
Method Detail
-
getId
public int getId()
getter for id- Returns:
- id
-
getNumberOfBicycles
public static int getNumberOfBicycles()
getter for numberOfBicycles- Returns:
- numberOfBicycles
-
toString
public java.lang.String toString()
the toString method for the Bicycle class with some representation for the class- Overrides:
toString
in classjava.lang.Object
- Returns:
- a message that represents the class
-
equals
public boolean equals(java.lang.Object o)
equals method for the Bicycle class- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- an object- Returns:
- true, if the two objects are "equal"; false, otherwise
-
hashCode
public int hashCode()
hashCode method for the Bicycle class- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hash(id)
-
-