Skip to content

Instantly share code, notes, and snippets.

View ronocod's full-sized avatar

Conor O'Donnell ronocod

View GitHub Profile
interface StringGetter {
String getString();
}
class A {
public A() {
System.out.println("Printing " + getStringer().getString());
}
@ronocod
ronocod / ivy.gradle
Created February 4, 2016 10:44
Ivy versioning in Gradle
/*
http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.html
[1.0,2.0] matches all versions greater or equal to 1.0 and lower or equal to 2.0
[1.0,2.0[ matches all versions greater or equal to 1.0 and lower than 2.0
]1.0,2.0] matches all versions greater than 1.0 and lower or equal to 2.0
]1.0,2.0[ matches all versions greater than 1.0 and lower than 2.0
[1.0,) matches all versions greater or equal to 1.0
]1.0,) matches all versions greater than 1.0
(,2.0] matches all versions lower or equal to 2.0
(,2.0[ matches all versions lower than 2.0
@ronocod
ronocod / 50Columns.java
Last active August 29, 2015 14:20
Formatting Discussion
public ResultType arbitraryMethodName(
FirstArgumentType firstArgument,
SecondArgumentType secondArgument,
ThirdArgumentType thirdArgument)
{
LocalVariableType localVariable =
method(firstArgument, secondArgument);
if (localVariable.isSomething(
thirdArgument, SOME_SHOUTY_CONSTANT))
{