I hereby claim:
- I am VallaDanger on github.
- I am valladanger (https://keybase.io/valladanger) on keybase.
- I have a public key whose fingerprint is BCF1 C38F 00E0 3FED C3AC 29E1 3F3A B7E0 8A7B 963E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
public class Main { | |
public static void main(String[] args) throws Exception { | |
System.out.println(reverse("0123456789")); | |
} | |
private static String reverse(String str) { | |
int size; | |
if((str == null) || (size = str.length()) == 0) { | |
return str; |
public class Main { | |
public static void main(String[] args) throws Exception { | |
System.out.println(new StringBuilderFizzBuzz(100).get()); | |
System.out.println(new StringFizzBuzz(100).get()); | |
} | |
private static abstract class FizzBuzz<C extends CharSequence> { | |
private final int limit; |
public class Main { | |
public static void main(String[] args) throws Exception { | |
System.out.println(getText(new StringBuilder("1,2,"), 3)); | |
} | |
private static StringBuilder build(StringBuilder sb, int i) { | |
if(i%3 == 0) { | |
sb.append("Fizz"); | |
} |
public static void main(String[] args) { | |
Type type = getCollectionType(ImmutableList.class, Number.class); | |
Gson gson = new GsonBuilder().registerTypeAdapter(type, new ImmutableList_TypeAdapter<Number>()).create(); | |
ImmutableList<Number> list = gson.fromJson("[1,2,3]", type); | |
ListVO vo = gson.fromJson("{\"numbers\":[1,2,3]}", ListVO.class); | |
} | |
private static class ListVO { | |
@Expose @SerializedName("numbers") | |
ImmutableList<Number> numbers; |