Package core.components
Class Bicycle
- java.lang.Object
-
- core.components.Bicycle
-
- Direct Known Subclasses:
ElectricalBicycle,MechanicalBicycle
public abstract class Bicycle extends java.lang.ObjectThe (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 booleanequals(java.lang.Object o)equals method for the Bicycle classintgetId()getter for idstatic intgetNumberOfBicycles()getter for numberOfBicyclesinthashCode()hashCode method for the Bicycle classjava.lang.StringtoString()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:
toStringin 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:
equalsin 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:
hashCodein classjava.lang.Object- Returns:
- hash(id)
-
-