Class Compass


public class Compass extends AbstractProvider<BaseProviders>
Since:
1.7.0
  • Constructor Details

  • Method Details

    • compassPoint

      public Compass compassPoint(Compass.CompassPoint compassPoint)
      Specify point of direction. If not specified, point of direction will be randomly selected.
      Parameters:
      compassPoint - point of direction.
      Returns:
      itself with specified point of direction.
      See Also:
    • word

      public String word()
      Returns full-size name of direction according to the specified Compass.CompassPoint point of direction.

      Specify point of direction using compassPoint(CompassPoint) method.

      Typical call of this method: compass().compassPoint(CompassPoint.CARDINAL).word();

      Returns:
      the full-size direction word according to the specified Compass.CompassPoint. Otherwise, the point of direction will be selected randomly.
    • abbreviation

      public String abbreviation()
      Returns abbreviation of direction according to the specified Compass.CompassPoint point of direction.

      Specify point of direction using compassPoint(CompassPoint) method.

      Typical call of this method: compass().compassPoint(CompassPoint.CARDINAL).abbreviation();

      Returns:
      the abbreviation of direction according to the specified Compass.CompassPoint. Otherwise, the point of direction will be selected randomly.
    • azimuth

      public String azimuth()
      Returns appropriate azimuth of direction according to the specified Compass.CompassPoint point of direction.

      Specify point of direction using compassPoint(CompassPoint) method.

      Typical call of this method: compass().compassPoint(CompassPoint.CARDINAL).azimuth();

      Returns:
      the appropriate azimuth of the direction according to the specified Compass.CompassPoint. Otherwise, the point of direction will be selected randomly.