Apply "type inference for generic instance creation" Java 7 feature

Change-Id: Ia14802c903ca67b9d94dc6038d70b0e9644bc621
This commit is contained in:
David Ostrovsky
2014-04-26 15:27:57 +02:00
parent 40a179b8ca
commit e73ae61339
224 changed files with 557 additions and 633 deletions

View File

@@ -55,7 +55,7 @@ public abstract class Predicate<T> {
if (that.length == 1) {
return that[0];
}
return new AndPredicate<T>(that);
return new AndPredicate<>(that);
}
/** Combine the passed predicates into a single AND node. */
@@ -64,7 +64,7 @@ public abstract class Predicate<T> {
if (that.size() == 1) {
return Iterables.getOnlyElement(that);
}
return new AndPredicate<T>(that);
return new AndPredicate<>(that);
}
/** Combine the passed predicates into a single OR node. */
@@ -73,7 +73,7 @@ public abstract class Predicate<T> {
if (that.length == 1) {
return that[0];
}
return new OrPredicate<T>(that);
return new OrPredicate<>(that);
}
/** Combine the passed predicates into a single OR node. */
@@ -82,7 +82,7 @@ public abstract class Predicate<T> {
if (that.size() == 1) {
return Iterables.getOnlyElement(that);
}
return new OrPredicate<T>(that);
return new OrPredicate<>(that);
}
/** Invert the passed node. */
@@ -130,7 +130,7 @@ public abstract class Predicate<T> {
public abstract boolean equals(Object other);
private static class Any<T> extends Predicate<T> {
private static final Any<Object> INSTANCE = new Any<Object>();
private static final Any<Object> INSTANCE = new Any<>();
private Any() {
}