ilog.views.maps.attribute
Class IlvDoubleAttribute

java.lang.Object
  extended by ilog.views.maps.IlvFeatureAttribute
      extended by ilog.views.maps.attribute.IlvDoubleAttribute
All Implemented Interfaces:
IlvPersistentObject
Direct Known Subclasses:
IlvAltitudeAttribute, IlvAngleAttribute, IlvDistanceAttribute

public class IlvDoubleAttribute
extends IlvFeatureAttribute

This feature attribute stores an attribute of type double.

Since:
ILOG JViews 3.0

Constructor Summary
IlvDoubleAttribute(double value)
          Creates a floating point double attribute.
IlvDoubleAttribute(IlvDoubleAttribute source)
          Copies this map attribute.
IlvDoubleAttribute(IlvInputStream stream)
          Reads an IlvDoubleAttribute from an IlvInputStream.
 
Method Summary
 IlvFeatureAttribute copy()
          Returns a copy of the object.
static double DoubleValue(IlvAttributeProperty attributes, String name)
          Returns the double value of the IlvDoubleAttribute whose name is specified.
 double getValue()
          Returns the double value of the attribute.
 void setValue(double 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

IlvDoubleAttribute

public IlvDoubleAttribute(double value)
Creates a floating point double attribute.

Parameters:
value - the value of this attribute.

IlvDoubleAttribute

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

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

IlvDoubleAttribute

public IlvDoubleAttribute(IlvDoubleAttribute 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 double getValue()
Returns the double value of the attribute.


setValue

public void setValue(double 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.

DoubleValue

public static double DoubleValue(IlvAttributeProperty attributes,
                                 String name)
Returns the double value of the IlvDoubleAttribute whose name is specified.

Parameters:
attributes - The IlvAttributeProperty that stores the attributes.
name - The name of the attribute.
Returns:
The value of the IlvDoubleAttribute as a double or Double.NaN, if the attribute is null.
Since:
JViews 5.5


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