forked from eugenp/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eugenp
committed
Aug 23, 2014
1 parent
2e48d26
commit c00ef53
Showing
3 changed files
with
42 additions
and
30 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
12 changes: 6 additions & 6 deletions
12
gson/src/test/java/org/baeldung/gson/deserialization/GenericFoo.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
package org.baeldung.gson.deserialization; | ||
|
||
public class GenericFoo<INTEGER> { | ||
public class GenericFoo<T> { | ||
|
||
public INTEGER intField; | ||
public T theValue; | ||
|
||
GenericFoo(final INTEGER value) { | ||
intField = value; | ||
public GenericFoo(final T value) { | ||
theValue = value; | ||
} | ||
|
||
// | ||
|
||
@Override | ||
public String toString() { | ||
return "GenericTargetClass{" + "intField=" + intField + '}'; | ||
public final String toString() { | ||
return "GenericTargetClass{" + "intField=" + theValue + '}'; | ||
} | ||
|
||
} |
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