Package com.uca.flights
Class FlightId
- java.lang.Object
-
- com.uca.flights.FlightId
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(FlightId other)Redefinition of compareTobooleanequals(java.lang.Object other)Redefinition of equalsjava.lang.StringgetValue()GetterinthashCode()Redefinition of hashCodejava.lang.StringtoString()Redefinition of toString
-
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Getter- Returns:
- flight id value
-
toString
public java.lang.String toString()
Redefinition of toString- Overrides:
toStringin classjava.lang.Object- Returns:
- the value of the flight id
-
compareTo
public int compareTo(FlightId other)
Redefinition of compareTo- Specified by:
compareToin interfacejava.lang.Comparable<FlightId>- Parameters:
other- the FlightId to compare to- Returns:
- 0 if other has the same value, 1 else
- Throws:
java.lang.IllegalArgumentException- on null parameter
-
equals
public boolean equals(java.lang.Object other)
Redefinition of equals- Overrides:
equalsin classjava.lang.Object- Parameters:
other- the FlightId to compare to- Returns:
- true if other has the same value, false else
- Throws:
java.lang.IllegalArgumentException- on null or not FlightId parameter
-
hashCode
public int hashCode()
Redefinition of hashCode- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hashcode
-
-