Package org.jfree.util
Class Rotation
java.lang.Object
org.jfree.util.Rotation
- All Implemented Interfaces:
Serializable
Represents a direction of rotation (
CLOCKWISE
or
ANTICLOCKWISE
).- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this object for equality with an other object.double
Returns the rotation factor, which is -1.0 forCLOCKWISE
and 1.0 forANTICLOCKWISE
.int
hashCode()
Returns a hash code value for the object.private Object
Ensures that serialization returns the unique instances.toString()
Returns a string representing the object.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
CLOCKWISE
Clockwise. -
ANTICLOCKWISE
The reverse order renders the primary dataset first. -
name
The name. -
factor
private double factorThe factor (-1.0 forCLOCKWISE
and 1.0 forANTICLOCKWISE
).
-
-
Constructor Details
-
Rotation
Private constructor.- Parameters:
name
- the name.factor
- the rotation factor.
-
-
Method Details
-
toString
Returns a string representing the object. -
getFactor
public double getFactor()Returns the rotation factor, which is -1.0 forCLOCKWISE
and 1.0 forANTICLOCKWISE
.- Returns:
- the rotation factor.
-
equals
Compares this object for equality with an other object. Implementation note: This simply compares the factor instead of the name. -
hashCode
public int hashCode()Returns a hash code value for the object. -
readResolve
Ensures that serialization returns the unique instances.- Returns:
- the object.
- Throws:
ObjectStreamException
- if there is a problem.
-