|
|||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.eclipse.emf.common.notify.impl.NotificationImpl
An extensible notification implementation.
| Field Summary | |
protected int |
eventType
The type of the change. |
protected static int |
IS_SET_CHANGE_INDEX
A position value which indicates that isTouch() should return false. |
protected double |
newIEEEPrimitiveValue
The old value for the case of PRIMITIVE_TYPE_DOUBLE,
and PRIMITIVE_TYPE_FLOAT. |
protected long |
newSimplePrimitiveValue
The new value for the case of PRIMITIVE_TYPE_BOOLEAN,
PRIMITIVE_TYPE_BYTE,
PRIMITIVE_TYPE_CHAR,
PRIMITIVE_TYPE_INT,
PRIMITIVE_TYPE_LONG,
and PRIMITIVE_TYPE_SHORT. |
protected java.lang.Object |
newValue
The new value for the case of PRIMITIVE_TYPE_OBJECT. |
protected double |
oldIEEEPrimitiveValue
The old value for the case of PRIMITIVE_TYPE_DOUBLE,
and PRIMITIVE_TYPE_FLOAT. |
protected long |
oldSimplePrimitiveValue
The old value for the case of PRIMITIVE_TYPE_BOOLEAN,
PRIMITIVE_TYPE_BYTE,
PRIMITIVE_TYPE_CHAR,
PRIMITIVE_TYPE_INT,
PRIMITIVE_TYPE_LONG,
and PRIMITIVE_TYPE_SHORT. |
protected java.lang.Object |
oldValue
The old value for the case of PRIMITIVE_TYPE_OBJECT. |
protected int |
position
The position. |
static int |
PRIMITIVE_TYPE_BOOLEAN
An indicator that the feature is a boolean. |
static int |
PRIMITIVE_TYPE_BYTE
An indicator that the feature is a byte. |
static int |
PRIMITIVE_TYPE_CHAR
An indicator that the feature is a char. |
static int |
PRIMITIVE_TYPE_DOUBLE
An indicator that the feature is a double. |
static int |
PRIMITIVE_TYPE_FLOAT
An indicator that the feature is a float. |
static int |
PRIMITIVE_TYPE_INT
An indicator that the feature is a int. |
static int |
PRIMITIVE_TYPE_LONG
An indicator that the feature is a long. |
static int |
PRIMITIVE_TYPE_OBJECT
An indicator that the feature is not a primitive type. |
static int |
PRIMITIVE_TYPE_SHORT
An indicator that the feature is a short. |
protected int |
primitiveType
The type of the feature. |
| Fields inherited from interface org.eclipse.emf.common.notify.Notification |
ADD, ADD_MANY, CREATE, EVENT_TYPE_COUNT, MOVE, NO_FEATURE_ID, NO_INDEX, REMOVE, REMOVE_MANY, REMOVING_ADAPTER, RESOLVE, SET, UNSET |
| Constructor Summary | |
NotificationImpl(int eventType,
boolean oldBooleanValue,
boolean newBooleanValue)
Creates an instance. |
|
NotificationImpl(int eventType,
boolean oldBooleanValue,
boolean newBooleanValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
byte oldByteValue,
byte newByteValue)
Creates an instance. |
|
NotificationImpl(int eventType,
byte oldByteValue,
byte newByteValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
char oldCharValue,
char newCharValue)
Creates an instance. |
|
NotificationImpl(int eventType,
char oldCharValue,
char newCharValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
double oldDoubleValue,
double newDoubleValue)
Creates an instance. |
|
NotificationImpl(int eventType,
double oldDoubleValue,
double newDoubleValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
float oldFloatValue,
float newFloatValue)
Creates an instance. |
|
NotificationImpl(int eventType,
float oldFloatValue,
float newFloatValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
int oldIntValue,
int newIntValue)
Creates an instance. |
|
NotificationImpl(int eventType,
int oldIntValue,
int newIntValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
long oldLongValue,
long newLongValue)
Creates an instance. |
|
NotificationImpl(int eventType,
long oldLongValue,
long newLongValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
java.lang.Object oldValue,
java.lang.Object newValue)
Creates an instance. |
|
NotificationImpl(int eventType,
java.lang.Object oldValue,
java.lang.Object newValue,
boolean isSetChange)
Creates an instance. |
|
NotificationImpl(int eventType,
java.lang.Object oldValue,
java.lang.Object newValue,
int position)
Creates an instance. |
|
NotificationImpl(int eventType,
short oldShortValue,
short newShortValue)
Creates an instance. |
|
NotificationImpl(int eventType,
short oldShortValue,
short newShortValue,
boolean isSetChange)
Creates an instance. |
|
| Method Summary | |
int |
getEventType()
Returns the type of change that has occurred. |
java.lang.Object |
getFeature()
Returns the object representing the feature of the notifier that has changed. |
protected java.lang.Object |
getFeatureDefaultValue()
|
int |
getFeatureID(java.lang.Class expectedClass)
Returns the numeric ID of the feature relative to the given class, or Notification.NO_FEATURE_ID when not applicable. |
boolean |
getNewBooleanValue()
Returns the new value of the notifier's feature, if it is of type boolean. |
byte |
getNewByteValue()
Returns the new value of the notifier's feature, if it is of type byte. |
char |
getNewCharValue()
Returns the new value of the notifier's feature, if it is of type char. |
double |
getNewDoubleValue()
Returns the new value of the notifier's feature, if it is of type double. |
float |
getNewFloatValue()
Returns the new value of the notifier's feature, if it is of type float. |
int |
getNewIntValue()
Returns the new value of the notifier's feature, if it is of type int. |
long |
getNewLongValue()
Returns the new value of the notifier's feature, if it is of type long. |
short |
getNewShortValue()
Returns the new value of the notifier's feature, if it is of type short. |
java.lang.String |
getNewStringValue()
Returns the new value of the notifier's feature as a String. |
java.lang.Object |
getNewValue()
Returns the value of the notifier's feature after the change occurred. |
java.lang.Object |
getNotifier()
Returns the object affected by the change. |
boolean |
getOldBooleanValue()
Returns the old value of the notifier's feature, if it is of type boolean. |
byte |
getOldByteValue()
Returns the old value of the notifier's feature, if it is of type byte. |
char |
getOldCharValue()
Returns the old value of the notifier's feature, if it is of type char. |
double |
getOldDoubleValue()
Returns the old value of the notifier's feature, if it is of type double. |
float |
getOldFloatValue()
Returns the old value of the notifier's feature, if it is of type float. |
int |
getOldIntValue()
Returns the old value of the notifier's feature, if it is of type int. |
long |
getOldLongValue()
Returns the old value of the notifier's feature, if it is of type long. |
short |
getOldShortValue()
Returns the old value of the notifier's feature, if it is of type short. |
java.lang.String |
getOldStringValue()
Returns the old value of the notifier's feature as a String. |
java.lang.Object |
getOldValue()
Returns the value of the notifier's feature before the change occurred. |
int |
getPosition()
Returns the position within a list-based feature at which the change occurred. |
boolean |
isReset()
Returns true if the notification's feature has been set to its default value. |
boolean |
isTouch()
Returns true if this notification represents an event that did not change the state of the notifying object. |
boolean |
merge(Notification notification)
Returns whether the notification can be and has been merged with this one. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PRIMITIVE_TYPE_OBJECT
indicator that the feature is not a primitive type.primitiveTypepublic static final int PRIMITIVE_TYPE_BOOLEAN
indicator that the feature is a boolean.primitiveTypepublic static final int PRIMITIVE_TYPE_BYTE
indicator that the feature is a byte.primitiveTypepublic static final int PRIMITIVE_TYPE_CHAR
indicator that the feature is a char.primitiveTypepublic static final int PRIMITIVE_TYPE_DOUBLE
indicator that the feature is a double.primitiveTypepublic static final int PRIMITIVE_TYPE_FLOAT
indicator that the feature is a float.primitiveTypepublic static final int PRIMITIVE_TYPE_INT
indicator that the feature is a int.primitiveTypepublic static final int PRIMITIVE_TYPE_LONG
indicator that the feature is a long.primitiveTypepublic static final int PRIMITIVE_TYPE_SHORT
indicator that the feature is a short.primitiveTypeprotected static final int IS_SET_CHANGE_INDEX
position value which indicates that isTouch() should return false.primitiveTypeprotected int primitiveType
PRIMITIVE_TYPE_OBJECT,
PRIMITIVE_TYPE_BOOLEAN,
PRIMITIVE_TYPE_BYTE,
PRIMITIVE_TYPE_CHAR,
PRIMITIVE_TYPE_DOUBLE,
PRIMITIVE_TYPE_FLOAT,
PRIMITIVE_TYPE_INT,
PRIMITIVE_TYPE_LONG,
PRIMITIVE_TYPE_SHORTprotected int eventType
getEventType()protected java.lang.Object oldValue
PRIMITIVE_TYPE_OBJECT.getOldValue()protected java.lang.Object newValue
PRIMITIVE_TYPE_OBJECT.getNewValue()protected long oldSimplePrimitiveValue
PRIMITIVE_TYPE_BOOLEAN,
PRIMITIVE_TYPE_BYTE,
PRIMITIVE_TYPE_CHAR,
PRIMITIVE_TYPE_INT,
PRIMITIVE_TYPE_LONG,
and PRIMITIVE_TYPE_SHORT.getOldValue(),
getOldBooleanValue(),
getOldByteValue(),
getOldCharValue(),
getOldIntValue(),
getOldLongValue(),
getOldShortValue()protected long newSimplePrimitiveValue
PRIMITIVE_TYPE_BOOLEAN,
PRIMITIVE_TYPE_BYTE,
PRIMITIVE_TYPE_CHAR,
PRIMITIVE_TYPE_INT,
PRIMITIVE_TYPE_LONG,
and PRIMITIVE_TYPE_SHORT.getNewValue(),
getNewBooleanValue(),
getNewByteValue(),
getNewCharValue(),
getNewIntValue(),
getNewLongValue(),
getNewShortValue()protected double oldIEEEPrimitiveValue
PRIMITIVE_TYPE_DOUBLE,
and PRIMITIVE_TYPE_FLOAT.getOldValue(),
getOldDoubleValue(),
getOldFloatValue()protected double newIEEEPrimitiveValue
PRIMITIVE_TYPE_DOUBLE,
and PRIMITIVE_TYPE_FLOAT.getOldValue(),
getOldDoubleValue(),
getOldFloatValue()protected int position
getPosition()| Constructor Detail |
public NotificationImpl(int eventType,
java.lang.Object oldValue,
java.lang.Object newValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
java.lang.Object oldValue,
java.lang.Object newValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
java.lang.Object oldValue,
java.lang.Object newValue,
int position)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
boolean oldBooleanValue,
boolean newBooleanValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
boolean oldBooleanValue,
boolean newBooleanValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
byte oldByteValue,
byte newByteValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
byte oldByteValue,
byte newByteValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
char oldCharValue,
char newCharValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
char oldCharValue,
char newCharValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
double oldDoubleValue,
double newDoubleValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
double oldDoubleValue,
double newDoubleValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
float oldFloatValue,
float newFloatValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
float oldFloatValue,
float newFloatValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
int oldIntValue,
int newIntValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
int oldIntValue,
int newIntValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
long oldLongValue,
long newLongValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
long oldLongValue,
long newLongValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.
public NotificationImpl(int eventType,
short oldShortValue,
short newShortValue,
boolean isSetChange)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.isSetChange - the indication of whether the state has changed.
public NotificationImpl(int eventType,
short oldShortValue,
short newShortValue)
eventType - the type of the change.oldValue - the old value before the change.newValue - the new value after the change.| Method Detail |
public java.lang.Object getNotifier()
NotificationgetNotifier in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic int getEventType()
NotificationgetEventType in interface Notificationorg.eclipse.emf.common.notify.NotificationNotifierpublic java.lang.Object getFeature()
NotificationgetFeature in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic int getFeatureID(java.lang.Class expectedClass)
NotificationNotification.NO_FEATURE_ID when not applicable.getFeatureID in interface Notificationorg.eclipse.emf.common.notify.NotificationexpectedClass - the class to which the ID is relative.Notification.NO_FEATURE_IDpublic java.lang.Object getOldValue()
NotificationgetOldValue in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic java.lang.Object getNewValue()
NotificationgetNewValue in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic boolean isTouch()
NotificationNotification.CREATE, Notification.ADD, Notification.ADD_MANY, Notification.REMOVE, Notification.REMOVE_MANY, Notification.MOVE,
it always returns false.
For the events Notification.RESOLVE and Notification.REMOVING_ADAPTER it always returns true.
For the events Notification.SET and Notification.UNSET it returns true if the old and the new value are equal;
In addition, for certain types of features there may be a distiction between
being set to a default value and not being set at all, which implies that it has the default value.
In this situation, even in the case that the old and new values are equal,
isTouch may never the less return false in order to indicate that, although the value has not changed,
the feature has gone from simply having a default value to being set to that same default value,
or has gone from being set to the default value back to being unset.isTouch in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic boolean isReset()
NotificationisReset in interface Notificationorg.eclipse.emf.common.notify.Notificationprotected java.lang.Object getFeatureDefaultValue()
public int getPosition()
NotificationNotification.NO_INDEX when not applicable.getPosition in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic boolean merge(Notification notification)
Notificationmerge in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic boolean getOldBooleanValue()
Notificationboolean.getOldBooleanValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't boolean.public boolean getNewBooleanValue()
Notificationboolean.getNewBooleanValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't boolean.public byte getOldByteValue()
Notificationbyte.getOldByteValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't byte.public byte getNewByteValue()
Notificationbyte.getNewByteValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't byte.public char getOldCharValue()
Notificationchar.getOldCharValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't char.public char getNewCharValue()
Notificationchar.getNewCharValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't char.public double getOldDoubleValue()
Notificationdouble.getOldDoubleValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't double.public double getNewDoubleValue()
Notificationdouble.getNewDoubleValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't double.public float getOldFloatValue()
Notificationfloat.getOldFloatValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't float.public float getNewFloatValue()
Notificationfloat.getNewFloatValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't float.public int getOldIntValue()
Notificationint.getOldIntValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't int.public int getNewIntValue()
Notificationint.getNewIntValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't int.public long getOldLongValue()
Notificationlong.getOldLongValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't long.public long getNewLongValue()
Notificationlong.getNewLongValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't long.public short getOldShortValue()
Notificationshort.getOldShortValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't short.public short getNewShortValue()
Notificationshort.getNewShortValue in interface Notificationorg.eclipse.emf.common.notify.NotificationIllegalStateException - if the feature isn't short.public java.lang.String getOldStringValue()
NotificationgetOldStringValue in interface Notificationorg.eclipse.emf.common.notify.Notificationpublic java.lang.String getNewStringValue()
NotificationgetNewStringValue in interface Notificationorg.eclipse.emf.common.notify.Notification
|
Copyright 2001-2002 IBM Corporation and others. All Rights Reserved. |
||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||