Ignore:
Timestamp:
2016-07-23T02:08:50+02:00 (4 years ago)
Author:
Don-vip
Message:

see #11390 - sonar - squid:S1610 - Java 8: Abstract classes without fields should be converted to interfaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java

    r10228 r10599  
    1212
    1313/**
    14  * Determines how an icon is to be rotated depending on the primitive to displayed.
     14 * Determines how an icon is to be rotated depending on the primitive to be displayed.
     15 * @since  8199 (creation)
     16 * @since 10599 (functional interface)
    1517 */
    16 public abstract class RotationAngle {
     18@FunctionalInterface
     19public interface RotationAngle {
    1720
    1821    /**
    19      * Calculates the rotation angle depending on the primitive to displayed.
     22     * Calculates the rotation angle depending on the primitive to be displayed.
    2023     * @param p primitive
    2124     * @return rotation angle
    2225     */
    23     public abstract double getRotationAngle(OsmPrimitive p);
     26    double getRotationAngle(OsmPrimitive p);
    2427
    2528    /**
     
    2831     * @return rotation angle
    2932     */
    30     public static RotationAngle buildStaticRotation(final double angle) {
     33    static RotationAngle buildStaticRotation(final double angle) {
    3134        return new RotationAngle() {
    3235            @Override
     
    4750     * @return rotation angle
    4851     */
    49     public static RotationAngle buildStaticRotation(final String string) {
     52    static RotationAngle buildStaticRotation(final String string) {
    5053        try {
    5154            return buildStaticRotation(parseCardinalRotation(string));
     
    6366     * @return the angle in radians
    6467     */
    65     public static double parseCardinalRotation(final String cardinal) {
     68    static double parseCardinalRotation(final String cardinal) {
    6669        switch (cardinal.toLowerCase(Locale.ENGLISH)) {
    6770            case "n":
     
    98101     * @return rotation angle
    99102     */
    100     public static RotationAngle buildWayDirectionRotation() {
     103    static RotationAngle buildWayDirectionRotation() {
    101104        return new RotationAngle() {
    102105            @Override
Note: See TracChangeset for help on using the changeset viewer.