Skip to content

Commit 8353354

Browse files
committed
format code
1 parent f71e186 commit 8353354

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

value-object/src/main/java/com/iluwatar/value/object/App.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
*
1515
* For more specific and strict rules to implement value objects check the rules from Stephen
1616
* Colebourne's term VALJO : http://blog.joda.org/2014/03/valjos-value-java-objects.html
17-
*
1817
*/
1918
public class App {
2019
/**
21-
*
2220
* This practice creates three HeroStats(Value object) and checks equality between those.
2321
*/
2422
public static void main(String[] args) {

value-object/src/main/java/com/iluwatar/value/object/HeroStat.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
*/
88
public class HeroStat {
99

10-
1110
// Stats for a hero
1211

1312
private final int strength;
1413
private final int intelligence;
1514
private final int luck;
1615

17-
1816
// All constructors must be private.
1917
private HeroStat(int strength, int intelligence, int luck) {
2018
super();
@@ -87,7 +85,6 @@ public boolean equals(Object obj) {
8785
return true;
8886
}
8987

90-
9188
// The clone() method should not be public. Just don't override it.
9289

9390
}

value-object/src/test/java/com/iluwatar/value/object/HeroStatTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public class HeroStatTest {
1616

1717
/**
18-
* Tester for equals() and hashCode() methods of a class. Using guava's EqualsTester
18+
* Tester for equals() and hashCode() methods of a class. Using guava's EqualsTester.
1919
*
2020
* @see http://static.javadoc.io/com.google.guava/guava-testlib/19.0/com/google/common/testing/
2121
* EqualsTester.html
@@ -33,15 +33,12 @@ public void testEquals() {
3333
*/
3434
@Test
3535
public void testToString() {
36-
3736
HeroStat heroStatA = HeroStat.valueOf(3, 9, 2);
3837
HeroStat heroStatB = HeroStat.valueOf(3, 9, 2);
3938
HeroStat heroStatC = HeroStat.valueOf(3, 9, 8);
4039

4140
assertThat(heroStatA.toString(), is(heroStatB.toString()));
4241
assertThat(heroStatA.toString(), is(not(heroStatC.toString())));
43-
44-
4542
}
4643

4744
}

0 commit comments

Comments
 (0)