org.expasy.jpl.commons.base
Class AbstractDecorator<T>

java.lang.Object
  extended by org.expasy.jpl.commons.base.AbstractDecorator<T>
Type Parameters:
T - the object type decorated.
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComparatorInverter

public abstract class AbstractDecorator<T>
extends Object
implements Serializable

A Decorator is a design pattern allowing new behaviour or responsabilities to be added to an existing T-object dynamically. It wraps T using composition instead of inheritance. All concrete decorators have to extends this class.

Version:
1.0
Author:
nikitin
See Also:
http://en.wikipedia.org/wiki/Decorator_pattern, Serialized Form

Field Summary
protected  T decoratedObject
           
 
Constructor Summary
protected AbstractDecorator(T decoratedObject)
           
 
Method Summary
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

decoratedObject

protected T decoratedObject
Constructor Detail

AbstractDecorator

protected AbstractDecorator(T decoratedObject)
Method Detail

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.