ilog.cpl.model
Class AttributeValueEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ilog.util.IlEventObject
          extended by ilog.cpl.model.AttributeValueEvent
All Implemented Interfaces:
Serializable

public class AttributeValueEvent
extends IlEventObject

Events when an attribute value changes.

Since:
JTGO 3.0
See Also:
Serialized Form

Nested Class Summary
static class AttributeValueEvent.Type
          Event types.
 
Field Summary
static Object OLD_VALUE_UNAVAILABLE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
protected AttributeValueEvent(IlEventType type, IlpAttributeValueHolder source, IlpAttribute attribute, Object newv, Object oldv)
          Constructor.
  AttributeValueEvent(IlEventType type, Object source, IlpAttribute attribute)
          Deprecated. Use AttributeValueEvent(IlpAttributeValueHolder, IlpAttribute) or { @link #AttributeValueEvent(IlpAttributeValueHolder, IlpAttribute, Object, Object)}
  AttributeValueEvent(IlpAttributeValueHolder source, IlpAttribute attribute)
          Constructor.
  AttributeValueEvent(IlpAttributeValueHolder source, IlpAttribute attribute, Object newValue, Object oldValue)
          Constructor.
 
Method Summary
 IlpAttribute getAttribute()
          Returns the attribute, the value of which was modified.
 IlpAttributeValueHolder getAttributeValueHolder()
          Returns the attribute value holder on which the value of an attribute was modified.
 Object getNewValue()
          Returns the value of the attribute after the modification signaled by this event.
 Object getOldValue()
          Returns the value of the attribute before the modification signaled by this event.
 boolean hasOldValue()
          Checks that the old value of the attribute is available.
 
Methods inherited from class ilog.util.IlEventObject
getType
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OLD_VALUE_UNAVAILABLE

public static final Object OLD_VALUE_UNAVAILABLE
Internal method or field: do not use!
Constructor Detail

AttributeValueEvent

public AttributeValueEvent(IlpAttributeValueHolder source,
                           IlpAttribute attribute)
Constructor.

Parameters:
source - The attribute value holder on which the value of an attribute was modified.
attribute - The attribute, the value of which was modified.

AttributeValueEvent

public AttributeValueEvent(IlpAttributeValueHolder source,
                           IlpAttribute attribute,
                           Object newValue,
                           Object oldValue)
Constructor.

Parameters:
source - The attribute value holder on which the value of an attribute was modified.
attribute - The attribute, the value of which was modified.
newValue - The new attribute value.
oldValue - The previous value of the attribute.
Since:
JTGO 4.0

AttributeValueEvent

public AttributeValueEvent(IlEventType type,
                           Object source,
                           IlpAttribute attribute)
Deprecated. Use AttributeValueEvent(IlpAttributeValueHolder, IlpAttribute) or { @link #AttributeValueEvent(IlpAttributeValueHolder, IlpAttribute, Object, Object)}

Constructor.

Deprecated Since:
JTGO 4.0

AttributeValueEvent

protected AttributeValueEvent(IlEventType type,
                              IlpAttributeValueHolder source,
                              IlpAttribute attribute,
                              Object newv,
                              Object oldv)
Constructor.

Parameters:
type - Event type
source - Object that has changed
attribute - Attribute that has changed
newv - New attribute value
oldv - Old attribute value
Since:
JTGO 4.0
Method Detail

getAttributeValueHolder

public IlpAttributeValueHolder getAttributeValueHolder()
Returns the attribute value holder on which the value of an attribute was modified.


getAttribute

public IlpAttribute getAttribute()
Returns the attribute, the value of which was modified.


getNewValue

public Object getNewValue()
Returns the value of the attribute after the modification signaled by this event.

Returns:
The new value of the attribute.
Since:
JTGO 4.0

getOldValue

public Object getOldValue()
Returns the value of the attribute before the modification signaled by this event.

In some cases the old value can be unavailable. Use hasOldValue() to check the availability of the old value.

Returns:
The value of the attribute before the modification signaled by this event.
Since:
JTGO 4.0

hasOldValue

public boolean hasOldValue()
Checks that the old value of the attribute is available. Use this method prior to call getOldValue().

Returns:
true when the old value of the attribute is available.
Since:
JTGO 4.0


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.