Package models
Class Route
java.lang.Object
models.Route
- All Implemented Interfaces:
 Serializable,Comparable<Route>
Model of Route. Main model of the program. Contains getters/setters of each class fields.
 Some fields have restrictions. It's signed under every method of field.
    - Since:
 - 1.0
 - See Also:
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintbooleanRestrictions: Field cannot be null.Restrictions: Field cannot be null and the value of this field should be automatically generated.intRestrictions: The value of this field should be greater than 1.getFrom()Restrictions: Field can be null.getId()Restrictions: Field cannot be null.getName()Restrictions: Field cannot be null.getTo()Restrictions: Field can be null.inthashCode()voidsetCoordinates(Coordinates coordinates) Restrictions: Field cannot be null.voidsetCreationDate(Date creationDate) Restrictions: Field cannot be null and the value of this field should be automatically generated.voidsetDistance(int distance) Restrictions: The value of this field should be greater than 1.voidRestrictions: Field can be null.voidRestrictions: Field cannot be null.voidRestrictions: Field cannot be null.voidRestrictions: Field can be null.toString() 
- 
Constructor Details
- 
Route
public Route() 
 - 
 - 
Method Details
- 
    
getId
Restrictions: Field cannot be null. The value of this field should be unique, greater than 0 and automatically generated.- Returns:
 - Value of field id
 
 - 
        
setId
Restrictions: Field cannot be null. The value of this field should be unique, greater than 0 and automatically generated.- Parameters:
 id- Value of field id
 - 
        
getName
Restrictions: Field cannot be null. String must not be empty.- Returns:
 - Value of field name
 
 - 
        
setName
Restrictions: Field cannot be null. String must not be empty.- Parameters:
 name- Value of field name
 - 
        
getCoordinates
Restrictions: Field cannot be null.- Returns:
 - Value of field coordinates
 
 - 
        
setCoordinates
Restrictions: Field cannot be null.- Parameters:
 coordinates- Value of field coordinates
 - 
        
getCreationDate
Restrictions: Field cannot be null and the value of this field should be automatically generated.- Returns:
 - Value of field creationDate
 
 - 
        
setCreationDate
Restrictions: Field cannot be null and the value of this field should be automatically generated.- Parameters:
 creationDate- Value of field creationDate
 - 
        
getFrom
Restrictions: Field can be null.- Returns:
 - Value of field from
 
 - 
        
setFrom
Restrictions: Field can be null.- Parameters:
 from- Value of field from
 - 
        
getTo
Restrictions: Field can be null.- Returns:
 - Value of field to
 
 - 
        
setTo
Restrictions: Field can be null.- Parameters:
 to- Value of field to
 - 
        
getDistance
public int getDistance()Restrictions: The value of this field should be greater than 1.- Returns:
 - Value of field distance
 
 - 
setDistance
public void setDistance(int distance) Restrictions: The value of this field should be greater than 1.- Parameters:
 distance- Value of field distance
 - 
equals
 - 
hashCode
public int hashCode() - 
toString
 - 
compareTo
- Specified by:
 compareToin interfaceComparable<Route>
 
 -