Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class DocumentProperty

java.lang.Object
  extended by com.aspose.cells.DocumentProperty
All Implemented Interfaces:
java.lang.Cloneable

public class DocumentProperty
extends java.lang.Object
implements java.lang.Cloneable

Represents a custom or built-in document property.


Method Summary
 java.lang.String getName()
          Gets the name of the property.
 int getType()
          Gets the data type of the property.
 java.lang.Object getValue()
          Gets the value of the property.
 void setValue(java.lang.Object value)
          Sets the value of the property.
 boolean toBool()
          Returns the property value as boolean.
 java.util.Date toDateTime()
          Returns the property value as DateTime in local timezone.
 double toDouble()
          Returns the property value as double.
 int toInt()
          Returns the property value as integer.
 long toLong()
          Returns the property value as long.
 java.lang.String toString()
          Returns the property value as a String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Gets the name of the property.

Returns:
the name of the property.

getValue

public java.lang.Object getValue()
Gets the value of the property.

Returns:
the value of the property.

setValue

public void setValue(java.lang.Object value)
Sets the value of the property.

Parameters:
value - the value of the property.

getType

public int getType()
Gets the data type of the property.

Returns:
the data type of the property.
See Also:
PropertyType

toString

public java.lang.String toString()
Returns the property value as a String. Converts a number property using Object.ToString(). Converts a boolean property into "Y" or "N". Converts a date property into a short date String.

Overrides:
toString in class java.lang.Object
Returns:
the property value as a String.

toInt

public int toInt()
Returns the property value as integer.

Returns:
the property value as integer.
Throws:
java.lang.Exception - if the property type is not PropertyType.Number.

toLong

public long toLong()
Returns the property value as long.

Returns:
the property value as long.
Throws:
java.lang.Exception - if the property type is not PropertyType.Number.

toDouble

public double toDouble()
Returns the property value as double.

Returns:
the property value as double.
Throws:
java.lang.Exception - if the property type is not PropertyType.Float.

toDateTime

public java.util.Date toDateTime()
Returns the property value as DateTime in local timezone.

Returns:
the property value as DateTime in local timezone.
Throws:
java.lang.Exception - if the property type is not PropertyType.Date.

toBool

public boolean toBool()
Returns the property value as boolean.

Returns:
the property value as boolean.
Throws:
java.lang.Exception - if the property type is not PropertyType.Boolean.