Created
July 5, 2016 13:12
-
-
Save tkfx/2042e420b6c7033070ab4e653932a509 to your computer and use it in GitHub Desktop.
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
// simple constructor | |
// | |
private final int x; | |
private final int y; | |
private final String z; | |
| |
public MyClass(int x, int y, String z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
} | |
| |
| |
// complex building | |
// | |
public static MyClass create(List<Stuff> list, Set<Stuff> set) { | |
// int x = some brains... | |
// int y = more brains... | |
// other brains... | |
// String z = more complex stuff here | |
// | |
return new MyClass(x, y, z); | |
} | |
| |
private final int x; | |
private final int y; | |
private final String z; | |
| |
private MyClass(int x, int y, String z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment