com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class PropertyValue

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<PropertyValue>


    public final class PropertyValue
    extends Object
    implements com.aspose.ms.System.IEquatable<PropertyValue>

    Represents property value inside DocumentMetadata{T}.

    • Constructor Summary

      Constructors 
      Constructor and Description
      PropertyValue(boolean value)
      Initializes a new instance of the PropertyValue class with boolean value.
      PropertyValue(byte[] values)
      Initializes a new instance of the PropertyValue class with byte array.
      PropertyValue(Date value)
      Initializes a new instance of the PropertyValue class with DateTime value.
      PropertyValue(double value)
      Initializes a new instance of the PropertyValue class with double value.
      PropertyValue(int value)
      Initializes a new instance of the PropertyValue class with integer value.
      PropertyValue(long value)
      Initializes a new instance of the PropertyValue class with long value.
      PropertyValue(String value)
      Initializes a new instance of the PropertyValue class with string value.
      PropertyValue(String[] values)
      Initializes a new instance of the PropertyValue class with string array.
    • Constructor Detail

      • PropertyValue

        public PropertyValue(int value)

        Initializes a new instance of the PropertyValue class with integer value.

        Parameters:
        value - Integer value.
      • PropertyValue

        public PropertyValue(long value)

        Initializes a new instance of the PropertyValue class with long value.

        Parameters:
        value - Long value.
      • PropertyValue

        public PropertyValue(boolean value)

        Initializes a new instance of the PropertyValue class with boolean value.

        Parameters:
        value - Boolean value.
      • PropertyValue

        public PropertyValue(double value)

        Initializes a new instance of the PropertyValue class with double value.

        Parameters:
        value - Double value.
      • PropertyValue

        public PropertyValue(String value)

        Initializes a new instance of the PropertyValue class with string value.

        Parameters:
        value - String value.
      • PropertyValue

        public PropertyValue(Date value)

        Initializes a new instance of the PropertyValue class with DateTime value.

        Parameters:
        value - DateTime value.
      • PropertyValue

        public PropertyValue(String[] values)

        Initializes a new instance of the PropertyValue class with string array.

        Parameters:
        values - String values.
      • PropertyValue

        public PropertyValue(byte[] values)

        Initializes a new instance of the PropertyValue class with byte array.

        Parameters:
        values - The values.
    • Method Detail

      • getType

        public final int getType()

        Gets MetadataPropertyType.

        Returns:
        Type of property.
      • toInt

        public final Integer toInt()

        Gets integer value.

        Returns:
        An integer value if property has MetadataPropertyType.Integer type; otherwise null.
      • toLong

        public final Long toLong()

        Gets long value.

        Returns:
        An long value if property has MetadataPropertyType.Long type; otherwise null.
      • toBool

        public final Boolean toBool()

        Gets boolean value.

        Returns:
        Boolean value if property has MetadataPropertyType.Boolean type; otherwise null.
      • toDouble

        public final Double toDouble()

        Gets double value.

        Returns:
        Double value if property has MetadataPropertyType.Double type; otherwise null.
      • toString

        public String toString()

        Gets string value.

        Overrides:
        toString in class Object
        Returns:
        String value if property has MetadataPropertyType.String type; otherwise null.
      • toDateTime

        public final Date toDateTime()

        Gets DateTime value.

        Returns:
        DateTime value if property has MetadataPropertyType.DateTime type; otherwise null.
      • toStringArray

        public final String[] toStringArray()

        Gets array of String value.

        Returns:
        The string array if property has MetadataPropertyType.StringArray type; otherwise null.
      • toByteArray

        public final byte[] toByteArray()

        Gets array of Byte value.

        Returns:
        The array of bytes if property has MetadataPropertyType.ByteArray type; otherwise null.
      • equals

        public final boolean equals(PropertyValue other,
                     boolean ignoreCase)

        Indicates whether the current object is equal to another object of the same type.

        Parameters:
        other - An object to compare with this object.
        ignoreCase - If set to true then ignore case.
        Returns:
        true if the current object is equal to the other parameter; otherwise, false.
      • equals

        public final boolean equals(PropertyValue other)

        Indicates whether the current object is equal to another object of the same type.

        Parameters:
        other - An object to compare with this object.
        Returns:
        true if the current object is equal to the other parameter; otherwise, false.
      • equals

        public boolean equals(Object obj)

        Indicates whether the current object is equal to another object of the same type.

        Specified by:
        equals in interface com.aspose.ms.System.IEquatable<PropertyValue>
        Overrides:
        equals in class Object
        Parameters:
        obj - An object to compare with this object.
        Returns:
        true if the current object is equal to the obj parameter; otherwise, false.
      • hashCode

        public int hashCode()

        Returns a hash code for this instance.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.