No using raw types. Also no annotating whole methods

@SuppressWarnings("unchecked") even if they're simple.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2437 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2008-09-18 17:23:56 +00:00
parent 52f5b41f44
commit d1ef556a55
+6 -6
View File
@@ -144,20 +144,20 @@ public abstract class Predicate<T>
* Returns a type-safe reference to the shared instance of a predicate that always returns
* <code>true</code>.
*/
@SuppressWarnings("unchecked")
public static <T> Predicate<T> trueInstance ()
{
return TRUE_INSTANCE;
@SuppressWarnings("unchecked") Predicate<T> pred = (Predicate<T>)TRUE_INSTANCE;
return pred;
}
/**
* Returns a type-safe reference to the shared instance of a predicate that always returns
* <code>false</code>.
*/
@SuppressWarnings("unchecked")
public static <T> Predicate<T> falseInstance ()
{
return FALSE_INSTANCE;
@SuppressWarnings("unchecked") Predicate<T> pred = (Predicate<T>)FALSE_INSTANCE;
return pred;
}
//--------------------------------------------------------------------
@@ -312,14 +312,14 @@ public abstract class Predicate<T>
}
/** A shared predicate instance that always matches its input. */
protected static final Predicate TRUE_INSTANCE = new Predicate() {
protected static final Predicate<Object> TRUE_INSTANCE = new Predicate<Object>() {
public boolean isMatch (Object object) {
return true;
}
};
/** A shared predicate instance that never matches its input. */
protected static final Predicate FALSE_INSTANCE = new Predicate() {
protected static final Predicate<Object> FALSE_INSTANCE = new Predicate<Object>() {
public boolean isMatch (Object object) {
return false;
}