igede

Untitled

Dec 10th, 2018
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. /**
  2.  * Filter is an abstract superclass for all image filters in this
  3.  * application. Filters can be applied to OFImages by invoking the apply
  4.  * method.
  5.  *
  6.  * @author Gede
  7.  * @version (10/12/2018)
  8.  */
  9. public abstract class Filter
  10. {
  11.     private String name;
  12.  
  13.     /**
  14.      * Create a new filter with a given name.
  15.      * @param name The name of the filter.
  16.      */
  17.     public Filter(String name)
  18.     {
  19.         this.name = name;
  20.     }
  21.    
  22.     /**
  23.      * Return the name of this filter.
  24.      *
  25.      * @return  The name of this filter.
  26.      */
  27.     public String getName()
  28.     {
  29.         return name;
  30.     }
  31.    
  32.     /**
  33.      * Apply this filter to an image.
  34.      *
  35.      * @param  image  The image to be changed by this filter.
  36.      */
  37.     public abstract void apply(OFImage image);
  38. }
Advertisement
Add Comment
Please, Sign In to add comment