- All Implemented Interfaces:
Component
Represents the Leaf object in the Composite pattern.
A Leaf has no children and defines behavior for primitive objects.
-
Constructor Summary
Constructors
Constructor for the Leaf.
-
Method Summary
void
Performs the operation specific to the Leaf.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Leaf
Constructor for the Leaf.
- Parameters:
name - The name of the Leaf.
-
Method Details
-
operation
public void operation()
Performs the operation specific to the Leaf.
- Specified by:
operation in interface Component