ilog.views.maps.attribute
Class IlvIntegerAttribute

java.lang.Object
  extended by ilog.views.maps.IlvFeatureAttribute
      extended by ilog.views.maps.attribute.IlvIntegerAttribute
All Implemented Interfaces:
IlvPersistentObject

public class IlvIntegerAttribute
extends IlvFeatureAttribute

This feature attribute stores integer values.

Since:
ILOG JViews 3.0

Constructor Summary
IlvIntegerAttribute(IlvInputStream stream)
          Reads an IlvIntegerAttribute from an IlvInputStream.
IlvIntegerAttribute(IlvIntegerAttribute source)
          Copies this map attribute.
IlvIntegerAttribute(int value)
          Creates an integer attribute.
 
Method Summary
 IlvFeatureAttribute copy()
          Returns a copy of the object.
 int getValue()
          Returns the integer value of the attribute.
static int IntValue(IlvAttributeProperty attributes, String name)
          Returns the int value of the IlvIntegerAttribute whose name is specified.
 void setValue(int value)
          Sets the value of the attribute.
 String toString()
          Converts the attribute into a string.
 void write(IlvOutputStream stream)
          Writes this to an IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvIntegerAttribute

public IlvIntegerAttribute(int value)
Creates an integer attribute.

Parameters:
value - the value of this attribute.

IlvIntegerAttribute

public IlvIntegerAttribute(IlvInputStream stream)
                    throws IlvReadFileException
Reads an IlvIntegerAttribute from an IlvInputStream.

Parameters:
stream - the input stream.
Throws:
IlvReadFileException - if the format is not correct.

IlvIntegerAttribute

public IlvIntegerAttribute(IlvIntegerAttribute source)
Copies this map attribute.

Parameters:
source - the object to be copied.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvFeatureAttribute
Parameters:
stream - the output stream.
Throws:
IOException - if an error occurs.

getValue

public int getValue()
Returns the integer value of the attribute.


setValue

public void setValue(int value)
Sets the value of the attribute.

Parameters:
value - the new value to be set.

toString

public String toString()
Converts the attribute into a string.

Overrides:
toString in class Object

copy

public IlvFeatureAttribute copy()
Returns a copy of the object.

Specified by:
copy in class IlvFeatureAttribute
Returns:
a copy of this IlvFeatureAttribute.

IntValue

public static int IntValue(IlvAttributeProperty attributes,
                           String name)
Returns the int value of the IlvIntegerAttribute whose name is specified.

Parameters:
attributes - The IlvAttributeProperty that stores the attributes.
name - The name of the attribute.
Returns:
The value of the IlvIntegerAttribute as an int, or 0 if the attribute is null.
Since:
JViews 5.5


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