Merge branch 'master' of https://github.com/iluwatar/java-design-patterns into FactoryMethodChanges
This commit is contained in:
commit
cd077fa490
builder/src/main/java/com/iluwatar/builder
caching/src/main/java/com/iluwatar/caching
flux/src/main/java/com/iluwatar/flux/dispatcher
multiton/src/main/java/com/iluwatar/multiton
naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap
null-object/src/main/java/com/iluwatar/nullobject
service-layer/src/main/java/com/iluwatar/servicelayer/hibernate
service-locator/src/main/java/com/iluwatar/servicelocator
singleton/src/main/java/com/iluwatar/singleton
InitializingOnDemandHolderIdiom.javaThreadSafeDoubleCheckLocking.javaThreadSafeLazyLoadedIvoryTower.java
step-builder/src/main/java/com/iluwatar/stepbuilder
tolerant-reader/src/main/java/com/iluwatar/tolerantreader
@ -27,7 +27,7 @@ package com.iluwatar.builder;
|
||||
* Hero, the class with many parameters.
|
||||
*
|
||||
*/
|
||||
public class Hero {
|
||||
public final class Hero {
|
||||
|
||||
private final Profession profession;
|
||||
private final String name;
|
||||
|
@ -33,7 +33,7 @@ import java.text.ParseException;
|
||||
* CacheStore class.
|
||||
*
|
||||
*/
|
||||
public class AppManager {
|
||||
public final class AppManager {
|
||||
|
||||
private static CachingPolicy cachingPolicy;
|
||||
|
||||
|
@ -43,7 +43,7 @@ import com.mongodb.client.model.UpdateOptions;
|
||||
* during runtime (createVirtualDB()).</p>
|
||||
*
|
||||
*/
|
||||
public class DbManager {
|
||||
public final class DbManager {
|
||||
|
||||
private static MongoClient mongoClient;
|
||||
private static MongoDatabase db;
|
||||
|
@ -37,7 +37,7 @@ import com.iluwatar.flux.store.Store;
|
||||
* Dispatcher sends Actions to registered Stores.
|
||||
*
|
||||
*/
|
||||
public class Dispatcher {
|
||||
public final class Dispatcher {
|
||||
|
||||
private static Dispatcher instance = new Dispatcher();
|
||||
|
||||
|
@ -30,7 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
* Nazgul is a Multiton class. Nazgul instances can be queried using {@link #getInstance} method.
|
||||
*
|
||||
*/
|
||||
public class Nazgul {
|
||||
public final class Nazgul {
|
||||
|
||||
private static Map<NazgulName, Nazgul> nazguls;
|
||||
|
||||
|
@ -19,7 +19,7 @@ import org.apache.isis.core.integtestsupport.IsisSystemForTest;
|
||||
import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller;
|
||||
import org.apache.isis.objectstore.jdo.datanucleus.IsisConfigurationForJdoIntegTests;
|
||||
|
||||
public class SimpleAppSystemInitializer {
|
||||
public final class SimpleAppSystemInitializer {
|
||||
|
||||
private SimpleAppSystemInitializer() {
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ package com.iluwatar.nullobject;
|
||||
* Implemented as Singleton, since all the NullNodes are the same.
|
||||
*
|
||||
*/
|
||||
public class NullNode implements Node {
|
||||
public final class NullNode implements Node {
|
||||
|
||||
private static NullNode instance = new NullNode();
|
||||
|
||||
|
@ -32,7 +32,7 @@ import org.hibernate.cfg.Configuration;
|
||||
/**
|
||||
* Produces the Hibernate {@link SessionFactory}.
|
||||
*/
|
||||
public class HibernateUtil {
|
||||
public final class HibernateUtil {
|
||||
|
||||
/**
|
||||
* The cached session factory
|
||||
|
@ -28,7 +28,7 @@ package com.iluwatar.servicelocator;
|
||||
*
|
||||
* @author saifasif
|
||||
*/
|
||||
public class ServiceLocator {
|
||||
public final class ServiceLocator {
|
||||
|
||||
private static ServiceCache serviceCache = new ServiceCache();
|
||||
|
||||
|
@ -34,7 +34,7 @@ import java.io.Serializable;
|
||||
*
|
||||
* @author mortezaadi@gmail.com
|
||||
*/
|
||||
public class InitializingOnDemandHolderIdiom implements Serializable {
|
||||
public final class InitializingOnDemandHolderIdiom implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -31,7 +31,7 @@ package com.iluwatar.singleton;
|
||||
*
|
||||
* @author mortezaadi@gmail.com
|
||||
*/
|
||||
public class ThreadSafeDoubleCheckLocking {
|
||||
public final class ThreadSafeDoubleCheckLocking {
|
||||
|
||||
private static volatile ThreadSafeDoubleCheckLocking instance;
|
||||
|
||||
|
@ -29,7 +29,7 @@ package com.iluwatar.singleton;
|
||||
* Note: if created by reflection then a singleton will not be created but multiple options in the
|
||||
* same classloader
|
||||
*/
|
||||
public class ThreadSafeLazyLoadedIvoryTower {
|
||||
public final class ThreadSafeLazyLoadedIvoryTower {
|
||||
|
||||
private static ThreadSafeLazyLoadedIvoryTower instance = null;
|
||||
|
||||
|
@ -28,7 +28,7 @@ import java.util.List;
|
||||
/**
|
||||
* The Step Builder class.
|
||||
*/
|
||||
public class CharacterStepBuilder {
|
||||
public final class CharacterStepBuilder {
|
||||
|
||||
private CharacterStepBuilder() {}
|
||||
|
||||
|
@ -38,7 +38,7 @@ import java.util.Map;
|
||||
* added to the schema.
|
||||
*
|
||||
*/
|
||||
public class RainbowFishSerializer {
|
||||
public final class RainbowFishSerializer {
|
||||
|
||||
private RainbowFishSerializer() {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user