Java Reference
In-Depth Information
Figure 11.11
Class structure for
filters as objects
,PDJH9LHZHU
DEVWUDFW!!
)LOWHU
,PDJH)LOH0DQDJHU
,PDJH3DQHO
'DUNHU)LOWHU
/LJKWHU)LOWHU
7KUHVKROG)LOWHU
2),PDJH
Code 11.11
Abstract class
Filter
:
Superclass for all filters
public abstract
class
Filter
{
private
String name;
/**
* Create a new filter with a given name.
*/
public
Filter(String name)
{
this
.name = name;
}
/**
* Return the name of this filter.
*
* @return The name of this filter.
*/
public
String getName()
{
return
name;
}
/**
* Apply this filter to an image.
*
Search WWH ::
Custom Search