-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for constructor arguments
- Loading branch information
1 parent
c4c8475
commit d718fe2
Showing
7 changed files
with
78 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
.../androidTest/java/io/fabianterhorst/iron/testdata/ClassWithoutPublicNoArgConstructor.java
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
iron/src/androidTest/java/io/fabianterhorst/iron/testdata/PersonArg.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.fabianterhorst.iron.testdata; | ||
|
||
import java.util.Arrays; | ||
|
||
public class PersonArg extends Person { | ||
public PersonArg(String name) { | ||
super(); | ||
setName("changed" + name); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || PersonArg.class != o.getClass()) return false; | ||
|
||
PersonArg person = (PersonArg) o; | ||
|
||
if (getAge() != person.getAge()) return false; | ||
if (!Arrays.equals(getBikes(), person.getBikes())) return false; | ||
if (getName() != null ? !getName().equals(person.getName()) : person.getName() != null) | ||
return false; | ||
//noinspection RedundantIfStatement | ||
if (getPhoneNumbers() != null | ||
? !getPhoneNumbers().equals(person.getPhoneNumbers()) | ||
: person.getPhoneNumbers() != null) | ||
return false; | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return super.hashCode(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters