Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void doStuff(Long inLong) {
- long theNumber = inLong;
- /* ... */
- }
- private void doStuff(Long inLong) {
- assert inLong != null;
- long theNumber = inLong;
- /* ... */
- }
- public void doStuff(Long inLong) {
- if (inLong == null) { throw new IllegalArgumentException(); }
- long theNumber = inLong;
- /* ... */
- }
- private void doStuff(Long inLong) {
- if (inLong == null) {
- handleUndef();
- } else {
- long theNumber = inLong;
- /* ... */
- }
- }
- theNumber = 0; // or Long.MIN_VALUE or Long.MAX_VALUE or whatever you prefer
- if (inLong != null) {
- theNumber = inLong;
- }
- // ...
- long theNumber = inLong;
- long theNumber = inLong.longValue();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement