Resolves checkstyle errors for trampoline twin typeobjectpattern unit-of-work value-object (#1074)
* Reduces checkstyle errors in trampoline * Reduces checkstyle errors in twin * Reduces checkstyle errors in typeobjectpattern * Reduces checkstyle errors in unit-of-work * Reduces checkstyle errors in value-object
This commit is contained in:
committed by
Ilkka Seppälä
parent
b92eb5229d
commit
f0f0143d48
@ -30,21 +30,20 @@ import org.slf4j.LoggerFactory;
|
||||
* A Value Object are objects which follow value semantics rather than reference semantics. This
|
||||
* means value objects' equality are not based on identity. Two value objects are equal when they
|
||||
* have the same value, not necessarily being the same object..
|
||||
*
|
||||
* Value Objects must override equals(), hashCode() to check the equality with values.
|
||||
* Value Objects should be immutable so declare members final.
|
||||
* Obtain instances by static factory methods.
|
||||
* The elements of the state must be other values, including primitive types.
|
||||
* Provide methods, typically simple getters, to get the elements of the state.
|
||||
* A Value Object must check equality with equals() not ==
|
||||
*
|
||||
* For more specific and strict rules to implement value objects check the rules from Stephen
|
||||
* Colebourne's term VALJO : http://blog.joda.org/2014/03/valjos-value-java-objects.html
|
||||
*
|
||||
* <p>Value Objects must override equals(), hashCode() to check the equality with values. Value
|
||||
* Objects should be immutable so declare members final. Obtain instances by static factory methods.
|
||||
* The elements of the state must be other values, including primitive types. Provide methods,
|
||||
* typically simple getters, to get the elements of the state. A Value Object must check equality
|
||||
* with equals() not ==
|
||||
*
|
||||
* <p>For more specific and strict rules to implement value objects check the rules from Stephen
|
||||
* Colebourne's term VALJO : http://blog.joda.org/2014/03/valjos-value-java-objects.html
|
||||
*/
|
||||
public class App {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||
|
||||
|
||||
/**
|
||||
* This practice creates three HeroStats(Value object) and checks equality between those.
|
||||
*/
|
||||
|
@ -24,11 +24,11 @@
|
||||
package com.iluwatar.value.object;
|
||||
|
||||
/**
|
||||
* HeroStat is a value object
|
||||
*
|
||||
* HeroStat is a value object.
|
||||
*
|
||||
* @see <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/doc-files/ValueBased.html">
|
||||
* http://docs.oracle.com/javase/8/docs/api/java/lang/doc-files/ValueBased.html
|
||||
* </a>
|
||||
* http://docs.oracle.com/javase/8/docs/api/java/lang/doc-files/ValueBased.html
|
||||
* </a>
|
||||
*/
|
||||
public class HeroStat {
|
||||
|
||||
|
Reference in New Issue
Block a user