Class RoutePlotQuestionProfile

All Implemented Interfaces:
Serializable, Cloneable, Comparable<Object>, Auditable, IDBean, MultipleChoice, PassStatistics, RoutePlot, ViewEntry, Cacheable

public class RoutePlotQuestionProfile extends MultiChoiceQuestionProfile implements RoutePlot
A bean to store route plotting question data.
Since:
2.3
Version:
7.0
Author:
Luke
See Also:
  • Constructor Details

    • RoutePlotQuestionProfile

      public RoutePlotQuestionProfile(String text)
      Creates a new route plotting question profile.
      Parameters:
      text - the Question text
      Throws:
      NullPointerException - if text is null
  • Method Details

    • getAirportA

      public Airport getAirportA()
      Description copied from interface: RoutePlot
      Returns the arrival Airport for this route.
      Specified by:
      getAirportA in interface RoutePlot
      Returns:
      the arrival Airport bean
    • getAirportD

      public Airport getAirportD()
      Description copied from interface: RoutePlot
      Returns the departure Airport for this route.
      Specified by:
      getAirportD in interface RoutePlot
      Returns:
      the departure Airport bean
    • getMidPoint

      public GeoLocation getMidPoint()
      Description copied from interface: RoutePlot
      Returns the mid-point between the two Airports.
      Specified by:
      getMidPoint in interface RoutePlot
      Returns:
      the midpoint
    • getDistance

      public int getDistance()
      Description copied from interface: RoutePlot
      Returns the distance between the two Airports.
      Specified by:
      getDistance in interface RoutePlot
      Returns:
      the distance in miles
    • setAirportA

      public void setAirportA(Airport a)
      Description copied from interface: RoutePlot
      Updates the arrival Airport.
      Specified by:
      setAirportA in interface RoutePlot
      Parameters:
      a - the arrival Airport bean
    • setAirportD

      public void setAirportD(Airport a)
      Description copied from interface: RoutePlot
      Updates the departure Airport.
      Specified by:
      setAirportD in interface RoutePlot
      Parameters:
      a - the departure Airport bean
    • getRowClassName

      public String getRowClassName()
      Description copied from class: QuestionProfile
      Returns the CSS row class name if included in a view table.
      Specified by:
      getRowClassName in interface ViewEntry
      Overrides:
      getRowClassName in class QuestionProfile
      Returns:
      the CSS class name
    • toQuestion

      public Question toQuestion()
      Description copied from class: MultiChoiceQuestionProfile
      Converts this profile into a MultiChoiceQuestion bean. The choices will be rearranged in random order.
      Overrides:
      toQuestion in class MultiChoiceQuestionProfile
      Returns:
      a Question bean