Package jgromacs.data

Class Angle

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Angle
    extends java.lang.Object
    implements java.lang.Cloneable
    Objects of this class represent an angle
    • Constructor Summary

      Constructors 
      Constructor Description
      Angle()
      Constructs a new Angle object
      Angle​(double valueInDegrees)
      Constructs a new Angle object of given value in degrees
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Returns an identical Angle object
      boolean equals​(java.lang.Object other)
      Returns true if the two angles are identical
      double getInDegrees()
      Returns the value of angle in degrees
      double getInRadians()
      Returns the value of angle in radians
      int hashCode()
      Returns hash code
      void setInDegrees​(double valueInDegrees)
      Sets the value of angle in degrees
      void setInRadians​(double valueInRadians)
      Sets the value of angle in radians
      java.lang.String toString()
      Returns the String representation of angle
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Angle

        public Angle()
        Constructs a new Angle object
      • Angle

        public Angle​(double valueInDegrees)
        Constructs a new Angle object of given value in degrees
        Parameters:
        valueInDegrees - value in degrees
    • Method Detail

      • getInDegrees

        public double getInDegrees()
        Returns the value of angle in degrees
        Returns:
        value in degrees
      • getInRadians

        public double getInRadians()
        Returns the value of angle in radians
        Returns:
        value in radians
      • setInDegrees

        public void setInDegrees​(double valueInDegrees)
        Sets the value of angle in degrees
        Parameters:
        valueInDegrees - value in degrees
      • setInRadians

        public void setInRadians​(double valueInRadians)
        Sets the value of angle in radians
        Parameters:
        valueInRadians - value in radians
      • equals

        public boolean equals​(java.lang.Object other)
        Returns true if the two angles are identical
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - the other angle
      • hashCode

        public int hashCode()
        Returns hash code
        Overrides:
        hashCode in class java.lang.Object
      • clone

        public java.lang.Object clone()
        Returns an identical Angle object
        Overrides:
        clone in class java.lang.Object
        Returns:
        clone of the angle
      • toString

        public java.lang.String toString()
        Returns the String representation of angle
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation