Object Design: Design Patterns
Volltext
Abbildung
ÄHNLICHE DOKUMENTE
Managing access to state, in particular to shared, mutable state (directly to member- variables of one class) with. ‣ Atomic change
According to GoF, there are two fundamental principles of reusable software design (that also underly most if not all patterns):2. 1 st Principle of
public final class PhoneNumber implements Product { private final short areaCode;. private final
public class ConcreteDocFactory implements DocumentFactory { private static final ConcreteDocFactory instance =.
@ThreadSafe //assuming that finder instance is threadsafe public class MovieLister implements MovieFinderInjector { private MovieFinder finder;.. public
increased runtime, because client has to compute or access stored extrinsic state information, and pass it into flyweight objects. ‣ Memory saving
public static final class Memento { private final int state;. private Memento(int state) { this.state
‣ The class TCPConnection maintains a state object that represents the current state of the TCP connection.. ‣ The class TCPConnection delegates all state-specific requests