Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/NotNullFilter.java')
-rw-r--r--common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/NotNullFilter.java51
1 files changed, 0 insertions, 51 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/NotNullFilter.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/NotNullFilter.java
deleted file mode 100644
index c1e27e45b9..0000000000
--- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/NotNullFilter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.common.utility.internal;
-
-import java.io.Serializable;
-
-import org.eclipse.jpt.common.utility.Filter;
-
-/**
- * This filter accepts only non-null objects.
- */
-public final class NotNullFilter<T>
- implements Filter<T>, Serializable
-{
- @SuppressWarnings("rawtypes")
- public static final Filter INSTANCE = new NotNullFilter();
-
- @SuppressWarnings("unchecked")
- public static <R> Filter<R> instance() {
- return INSTANCE;
- }
-
- // ensure single instance
- private NotNullFilter() {
- super();
- }
-
- // accept only non-null objects
- public boolean accept(T o) {
- return o != null;
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-
- private static final long serialVersionUID = 1L;
- private Object readResolve() {
- // replace this object with the singleton
- return INSTANCE;
- }
-
-}

Back to the top