Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/ObjectReference.java')
-rw-r--r--common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/ObjectReference.java35
1 files changed, 24 insertions, 11 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/ObjectReference.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/ObjectReference.java
index 991c2c97d2..54b6ba49f9 100644
--- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/ObjectReference.java
+++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/ObjectReference.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,20 +10,33 @@
package org.eclipse.jpt.common.utility;
/**
- * Provide a container for passing an object that can be changed by the recipient.
+ * Provide a container for holding an object that cannot be changed.
+ *
+ * @see ModifiableObjectReference
*/
-public interface ObjectReference<V>
- extends ReadOnlyObjectReference<V>
-{
+public interface ObjectReference<V> {
+ /**
+ * Return the current value.
+ */
+ V getValue();
+
+ /**
+ * Return whether the current value is equal to the specified value.
+ */
+ boolean valueEquals(Object object);
+
+ /**
+ * Return whether the current value is not equal to the specified value.
+ */
+ boolean valueNotEqual(Object object);
+
/**
- * Set the value.
- * Return the previous value.
+ * Return whether the current value is <code>null</code>.
*/
- V setValue(V value);
+ boolean isNull();
/**
- * Set the value to <code>null</code>.
- * Return the previous value.
+ * Return whether the current value is not <code>null</code>.
*/
- V setNull();
+ boolean isNotNull();
}

Back to the top