Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amikey/java-design-patterns
/ types & classes
Types & classes
495 in github.com/amikey/java-design-patterns
⨍
Functions
1,160
◇
Types & classes
495
Interface
AbilityStep
This step is in charge of abilities. Next Step available : BuildStep
step-builder/src/main/java/com/iluwatar/stepbuilder/CharacterStepBuilder.java:61
Class
AbstractCreature
Base class for concrete creatures.
specification/src/main/java/com/iluwatar/specification/creature/AbstractCreature.java:12
Class
AbstractFilter
Base class for order processing filters. Handles chain management.
intercepting-filter/src/main/java/com/iluwatar/intercepting/filter/AbstractFilter.java:8
Class
Action
Action is the data payload dispatched to the stores when something happens.
flux/src/main/java/com/iluwatar/flux/action/Action.java:8
Enum
Action
facade/src/main/java/com/iluwatar/facade/DwarvenMineWorker.java:59
Enum
Action
Action enumeration.
mediator/src/main/java/com/iluwatar/mediator/Action.java:8
Enum
ActionType
Types of actions.
flux/src/main/java/com/iluwatar/flux/action/ActionType.java:8
Class
AddressFilter
Concrete implementation of filter This filter is responsible for checking/filtering the input in the address field. @author joshzambales
intercepting-filter/src/main/java/com/iluwatar/intercepting/filter/AddressFilter.java:9
Class
AdvancedWizard
AdvancedWizard implements inversion of control. It depends on abstraction that can be injected through its constructor.
dependency-injection/src/main/java/com/iluwatar/dependency/injection/AdvancedWizard.java:10
Class
AlchemistShop
AlchemistShop holds potions on its shelves. It uses PotionFactory to provide the potions.
flyweight/src/main/java/com/iluwatar/flyweight/AlchemistShop.java:12
Class
AngryState
Angry state.
state/src/main/java/com/iluwatar/state/AngryState.java:8
Class
App
Service locator pattern, used to lookup jndi services and cache them for subsequent requests. @author saifasif
service-locator/src/main/java/com/iluwatar/servicelocator/App.java:9
Class
App
One of possible approaches to terminate Producer-Consumer pattern is using PoisonPill idiom. If you use PoisonPill as termination signal then Producer
poison-pill/src/main/java/com/iluwatar/poison/pill/App.java:12
Class
App
Flux is the application architecture that Facebook uses for building client-side web applications. Flux eschews MVC in favor of a unidirectional data
flux/src/main/java/com/iluwatar/flux/app/App.java:25
Class
App
Decorator pattern is more flexible alternative to subclassing. The decorator class implements the same interface as the target and uses composition to
decorator/src/main/java/com/iluwatar/decorator/App.java:13
Class
App
In Bridge pattern both abstraction (MagicWeapon) and implementation (MagicWeaponImp) have their own class hierarchies. The interface of the implementa
bridge/src/main/java/com/iluwatar/bridge/App.java:10
Class
App
With Composite we can treat tree hierarchies of objects with uniform interface (LetterComposite). In this example we have sentences composed of words
composite/src/main/java/com/iluwatar/composite/App.java:10
Class
App
The Business Delegate pattern adds an abstraction layer between presentation and business tiers. By using the pattern we gain loose coupling between t
business-delegate/src/main/java/com/iluwatar/business/delegate/App.java:18
Class
App
Strategy (DragonSlayingStrategy) encapsulates an algorithm. The containing object (DragonSlayer) can alter its behavior by changing its strategy.
strategy/src/main/java/com/iluwatar/strategy/App.java:9
Class
App
The essence of the Abstract Factory pattern is a factory interface (KingdomFactory) and its implementations (ElfKingdomFactory, OrcKingdomFactory). T
abstract-factory/src/main/java/com/iluwatar/abstractfactory/App.java:13
Class
App
Facade (DwarvenGoldmineFacade) provides simpler interface to subsystem. http://en.wikipedia.org/wiki/Facade_pattern
facade/src/main/java/com/iluwatar/facade/App.java:9
Class
App
Memento pattern is for storing and restoring object state. The object (Star) gives out a "memento" (StarMemento) that contains the state of the object
memento/src/main/java/com/iluwatar/memento/App.java:12
Class
App
Interpreter pattern breaks sentences into expressions (Expression) that can be evaluated and as a whole form the result.
interpreter/src/main/java/com/iluwatar/interpreter/App.java:11
Class
App
In Command pattern actions are objects that can be executed and undone. Four terms always associated with the command pattern are command, receiver,
command/src/main/java/com/iluwatar/command/App.java:21
Class
App
The central idea of Specification pattern is to separate the statement of how to match a candidate, from the candidate object that it is matched again
specification/src/main/java/com/iluwatar/specification/app/App.java:32
Class
App
Resource Acquisition Is Initialization pattern was developed for exception safe resource management by C++ creator Bjarne Stroustrup. In RAII resourc
resource-acquisition-is-initialization/src/main/java/com/iluwatar/resource/acquisition/is/initialization/App.java:27
Class
App
The Private Class Data design pattern seeks to reduce exposure of attributes by limiting their visibility. It reduces the number of class attributes b
private-class-data/src/main/java/com/iluwatar/privateclassdata/App.java:21
Class
App
Singleton pattern ensures that the class (IvoryTower) can have only one existing instance per java classloader instance and provides global access to
singleton/src/main/java/com/iluwatar/singleton/App.java:17
Class
App
Repository pattern mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects. A system with c
repository/src/main/java/com/iluwatar/repository/App.java:22
Class
App
In State pattern the container object (Mammoth) has an internal state object (State) that defines the current behavior. The state object can be change
state/src/main/java/com/iluwatar/state/App.java:12
Class
App
Model-View-Controller is a pattern for implementing user interfaces. It divides the application into three interconnected parts namely the model, the
model-view-controller/src/main/java/com/iluwatar/model/view/controller/App.java:18
Class
App
In Factory Method we have an interface (Blacksmith) with a method for creating objects (manufactureWeapon). The concrete subclasses (OrcBlacksmith, El
factory-method/src/main/java/com/iluwatar/factory/method/App.java:10
Class
App
Mediator encapsulates how a set of objects (PartyMember) interact. Instead of referring to each other directly they use a mediator (Party) interface.
mediator/src/main/java/com/iluwatar/mediator/App.java:9
Class
App
Tolerant Reader is an integration pattern that helps creating robust communication systems. The idea is to be as tolerant as possible when reading dat
tolerant-reader/src/main/java/com/iluwatar/tolerantreader/App.java:20
Class
App
Proxy (WizardTowerProxy) controls access to the actual object (WizardTower).
proxy/src/main/java/com/iluwatar/proxy/App.java:8
Class
App
This is an app that checks whether the order request is valid through pre-processing done via Filters Each field has its own corresponding Filter @aut
intercepting-filter/src/main/java/com/iluwatar/intercepting/filter/App.java:10
Class
App
<p> Layers is an architectural style where software responsibilities are divided among the different layers of the application. </p> <p> This example
layers/src/main/java/com/iluwatar/layers/App.java:58
Class
App
Iterator (ItemIterator) adds abstraction layer on top of a collection (TreasureChest). This way the collection can change its internal implementation
iterator/src/main/java/com/iluwatar/iterator/App.java:10
Class
App
Dependency Injection pattern deals with how objects handle their dependencies. The pattern implements so called inversion of control principle. Invers
dependency-injection/src/main/java/com/iluwatar/dependency/injection/App.java:27
Class
App
Chain of Responsibility organizes request handlers (RequestHandler) into a chain where each handler has a chance to act on the request on its turn. In
chain/src/main/java/com/iluwatar/chain/App.java:11
Class
App
When it is necessary to work with a large number of objects that are particularly expensive to instantiate and each object is only needed for a short
object-pool/src/main/java/com/iluwatar/object/pool/App.java:21
Class
App
Servant offers some functionality to a group of classes without defining that functionality in each of them. A Servant is a class whose instance provi
servant/src/main/java/com/iluwatar/servant/App.java:12
Class
App
Service layer defines an application's boundary with a layer of services that establishes a set of available operations and coordinates the applicatio
service-layer/src/main/java/com/iluwatar/servicelayer/app/App.java:36
Class
App
Thread Pool pattern is where a number of threads are created to perform a number of tasks, which are usually organized in a queue. The results from t
thread-pool/src/main/java/com/iluwatar/threadpool/App.java:22
Class
App
With the DAO pattern, we can use various method calls to retrieve/add/delete/update data without directly interacting with the data. The below example
dao/src/main/java/com/iluwatar/dao/App.java:11
Class
App
Whereas Singleton design pattern introduces single globally accessible object the Multiton pattern defines many globally accessible objects. The clien
multiton/src/main/java/com/iluwatar/multiton/App.java:15
Class
App
In Inventory we store the items with a given size. However, we do not store more items than the inventory size. To address concurrent access problems
double-checked-locking/src/main/java/com/iluwatar/doublechecked/locking/App.java:13
Class
App
When a message with a parameter is sent to an object, the resultant behaviour is defined by the implementation of that method in the receiver. Sometim
double-dispatch/src/main/java/com/iluwatar/doubledispatch/App.java:26
Class
App
Visitor pattern defines mechanism to apply operations on nodes in hierarchy. New operations can be added without altering the node interface. In this
visitor/src/main/java/com/iluwatar/visitor/App.java:15
Class
App
The Execute Around idiom specifies some code to be executed before and after a method. Typically the idiom is used when the API has methods to be exec
execute-around/src/main/java/com/iluwatar/execute/around/App.java:16
Class
App
This application demonstrates Half-Sync/Half-Async pattern. Key parts of the pattern are {@link AsyncTask} and {@link AsynchronousService}. <p> <i>PR
half-sync-half-async/src/main/java/com/iluwatar/halfsynchalfasync/App.java:48
Class
App
Flyweight pattern is useful when the program needs a huge amount of objects. It provides means to decrease resource usage by sharing object instances.
flyweight/src/main/java/com/iluwatar/flyweight/App.java:17
Class
App
There are two variations of the Adapter pattern: The class adapter implements the adaptee's interface whereas the object adapter uses composition to c
adapter/src/main/java/com/iluwatar/adapter/App.java:15
Class
App
Null Object pattern replaces null values with neutral objects. Many times this simplifies algorithms since no extra null checks are needed. In this e
null-object/src/main/java/com/iluwatar/nullobject/App.java:14
Class
App
The Event Aggregator pattern channels events from multiple objects into a single object to simplify registration for clients. In the example LordBael
event-aggregator/src/main/java/com/iluwatar/event/aggregator/App.java:16
Class
App
This is the Builder pattern variation as described by Joshua Bloch in Effective Java 2nd Edition. We want to build Hero objects, but its construction
builder/src/main/java/com/iluwatar/builder/App.java:18
Class
App
<p> This application demonstrates the async method invocation pattern. Key parts of the pattern are <code>AsyncResult</code> which is an intermediate
async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/App.java:38
Class
App
Step Builder Pattern <p><b>Intent</b> <br/> An extension of the Builder pattern that fully guides the user through the creation of the object with no
step-builder/src/main/java/com/iluwatar/stepbuilder/App.java:38
Class
App
Example of Character instantiation using Property pattern (as concept also known like Prototype inheritance). In prototype inheritance instead of clas
property/src/main/java/com/iluwatar/property/App.java:12
Class
App
The Front Controller is a presentation tier pattern. Essentially it defines a controller that handles all requests for a web site. The Front Controll
front-controller/src/main/java/com/iluwatar/front/controller/App.java:21
Class
App
Callback pattern is more native for functional languages where function is treated as first-class citizen. Prior to Java8 can be simulated using simpl
callback/src/main/java/com/iluwatar/callback/App.java:7
Class
App
Template Method defines a skeleton for an algorithm. The algorithm subclasses provide implementation for the blank parts. In this example HalflingThi
template-method/src/main/java/com/iluwatar/templatemethod/App.java:12
Class
App
Lazy loading idiom defers object creation until needed. This example shows different implementations of the pattern with increasing sophistication.
lazy-loading/src/main/java/com/iluwatar/lazy/loading/App.java:14
Class
App
Observer pattern defines one-to-many relationship between objects. The target object sends change notifications to its registered observers.
observer/src/main/java/com/iluwatar/observer/App.java:13
Class
App
In Prototype we have a factory class (HeroFactoryImpl) producing objects by cloning existing ones. In this example the factory's prototype objects are
prototype/src/main/java/com/iluwatar/prototype/App.java:10
Class
AppTest
service-locator/src/test/java/com/iluwatar/servicelocator/AppTest.java:7
Class
AppTest
poison-pill/src/test/java/com/iluwatar/poison/pill/AppTest.java:7
Class
AppTest
flux/src/test/java/com/iluwatar/flux/app/AppTest.java:7
Class
AppTest
decorator/src/test/java/com/iluwatar/decorator/AppTest.java:7
Class
AppTest
bridge/src/test/java/com/iluwatar/bridge/AppTest.java:7
Class
AppTest
composite/src/test/java/com/iluwatar/composite/AppTest.java:7
Class
AppTest
business-delegate/src/test/java/com/iluwatar/business/delegate/AppTest.java:7
Class
AppTest
strategy/src/test/java/com/iluwatar/strategy/AppTest.java:7
Class
AppTest
abstract-factory/src/test/java/com/iluwatar/abstractfactory/AppTest.java:6
Class
AppTest
facade/src/test/java/com/iluwatar/facade/AppTest.java:7
Class
AppTest
memento/src/test/java/com/iluwatar/memento/AppTest.java:7
Class
AppTest
interpreter/src/test/java/com/iluwatar/interpreter/AppTest.java:7
Class
AppTest
command/src/test/java/com/iluwatar/command/AppTest.java:7
Class
AppTest
specification/src/test/java/com/iluwatar/specification/app/AppTest.java:7
Class
AppTest
resource-acquisition-is-initialization/src/test/java/com/iluwatar/resource/acquisition/is/initialization/AppTest.java:7
Class
AppTest
private-class-data/src/test/java/com/iluwatar/privateclassdata/AppTest.java:7
Class
AppTest
singleton/src/test/java/com/iluwatar/singleton/AppTest.java:7
Class
AppTest
repository/src/test/java/com/iluwatar/repository/AppTest.java:7
Class
AppTest
state/src/test/java/com/iluwatar/state/AppTest.java:7
Class
AppTest
model-view-controller/src/test/java/com/iluwatar/model/view/controller/AppTest.java:7
Class
AppTest
factory-method/src/test/java/com/iluwatar/factory/method/AppTest.java:7
Class
AppTest
mediator/src/test/java/com/iluwatar/mediator/AppTest.java:7
Class
AppTest
tolerant-reader/src/test/java/com/iluwatar/tolerantreader/AppTest.java:13
Class
AppTest
proxy/src/test/java/com/iluwatar/proxy/AppTest.java:7
Class
AppTest
intercepting-filter/src/test/java/com/iluwatar/intercepting/filter/AppTest.java:7
Class
AppTest
iterator/src/test/java/com/iluwatar/iterator/AppTest.java:7
Class
AppTest
dependency-injection/src/test/java/com/iluwatar/dependency/injection/AppTest.java:7
Class
AppTest
chain/src/test/java/com/iluwatar/chain/AppTest.java:7
Class
AppTest
object-pool/src/test/java/com/iluwatar/object/pool/AppTest.java:7
Class
AppTest
servant/src/test/java/com/iluwatar/servant/AppTest.java:7
Class
AppTest
service-layer/src/test/java/com/iluwatar/servicelayer/app/AppTest.java:7
Class
AppTest
thread-pool/src/test/java/com/iluwatar/threadpool/AppTest.java:7
Class
AppTest
dao/src/test/java/com/iluwatar/dao/AppTest.java:7
Class
AppTest
multiton/src/test/java/com/iluwatar/multiton/AppTest.java:7
Class
AppTest
double-checked-locking/src/test/java/com/iluwatar/doublechecked/locking/AppTest.java:7
next →
1–100 of 495, ranked by callers