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

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

Location:
trunk/src/org/openstreetmap/josm/command
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/Command.java

    r10467 r10599  
    3737 *
    3838 * @author imi
     39 * @since 21 (creation)
     40 * @since 10599 (signature)
    3941 */
    40 public abstract class Command extends PseudoCommand {
     42public abstract class Command implements PseudoCommand {
    4143
    4244    private static final class CloneVisitor extends AbstractVisitor {
  • trunk/src/org/openstreetmap/josm/command/PseudoCommand.java

    r8447 r10599  
    1212 * as subcommand of real commands but it is just an empty shell and can not be
    1313 * executed or undone.
     14 * @since  3262 (creation)
     15 * @since 10599 (functional interface)
    1416 */
    15 public abstract class PseudoCommand {
     17public interface PseudoCommand {
    1618
    1719    /**
     
    1921     * @return description text representing this command
    2022     */
    21     public abstract String getDescriptionText();
     23    String getDescriptionText();
    2224
    2325    /**
     
    2527     * @return descriptive icon of this command
    2628     */
    27     public Icon getDescriptionIcon() {
     29    default Icon getDescriptionIcon() {
    2830        return null;
    2931    }
     
    3335     * @return primitives that take part in this command
    3436     */
    35     public abstract Collection<? extends OsmPrimitive> getParticipatingPrimitives();
     37    Collection<? extends OsmPrimitive> getParticipatingPrimitives();
    3638
    3739    /**
     
    4042     * @return the subcommands, null if there are no child commands
    4143     */
    42     public Collection<PseudoCommand> getChildren() {
     44    default Collection<PseudoCommand> getChildren() {
    4345        return null;
    4446    }
Note: See TracChangeset for help on using the changeset viewer.