ilog.views.maps.attribute
Class IlvBooleanAttribute

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

public class IlvBooleanAttribute
extends IlvFeatureAttribute

This feature attribute stores boolean values.

Since:
ILOG JViews 3.0

Constructor Summary
IlvBooleanAttribute(boolean value)
          Creates a logical attribute with a value corresponding to the logical value of the specified boolean.
IlvBooleanAttribute(Boolean value)
          Creates a logical attribute with the specified value.
IlvBooleanAttribute(IlvBooleanAttribute source)
          Creates a new object by copy.
IlvBooleanAttribute(IlvInputStream stream)
          Reads an IlvBooleanAttribute from an IlvInputStream.
 
Method Summary
static boolean BooleanValue(IlvAttributeProperty attributes, String name)
          Returns the boolean value of the IlvBooleanAttribute whose name is specified.
 IlvFeatureAttribute copy()
          Copies this attribute.
 Boolean getValue()
          Returns the logical value of the attribute.
 boolean isFalse()
          returns true if the logical value is false.
 boolean isTrue()
          Returns true if the logical value is true.
 void setValue(boolean value)
          Sets the logical value of the attribute.
 void setValue(Boolean value)
          Sets the logical value of the attribute.
 String toString()
          Converts the attribute into a string.
 void write(IlvOutputStream stream)
          Write this to an IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvBooleanAttribute

public IlvBooleanAttribute(Boolean value)
Creates a logical attribute with the specified value.

Parameters:
value - the value (TRUE,FALSE).

IlvBooleanAttribute

public IlvBooleanAttribute(boolean value)
Creates a logical attribute with a value corresponding to the logical value of the specified boolean.

Parameters:
value - the boolean value.

IlvBooleanAttribute

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

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

IlvBooleanAttribute

public IlvBooleanAttribute(IlvBooleanAttribute source)
Creates a new object by copy.

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

write

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

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvFeatureAttribute
Parameters:
stream - The output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

getValue

public Boolean getValue()
Returns the logical value of the attribute.


setValue

public void setValue(Boolean value)
Sets the logical value of the attribute.

Parameters:
value - the new value to be set

setValue

public void setValue(boolean value)
Sets the logical value of the attribute.

Parameters:
value - the new value to be set

isTrue

public boolean isTrue()
Returns true if the logical value is true.


isFalse

public boolean isFalse()
returns true if the logical value is false.


toString

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

Overrides:
toString in class Object

copy

public IlvFeatureAttribute copy()
Copies this attribute.

Specified by:
copy in class IlvFeatureAttribute
Returns:
a copy of the object.

BooleanValue

public static boolean BooleanValue(IlvAttributeProperty attributes,
                                   String name)
Returns the boolean value of the IlvBooleanAttribute whose name is specified.

Parameters:
attributes - The IlvAttributeProperty that stores the attributes.
name - The name of the attribute.
Returns:
The value of the IlvBooleanAttribute as a boolean or false, if the attribute is null.
Since:
JViews 5.5


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