com.davisor.data
Class URLTextData

java.lang.Object
  extended bycom.davisor.data.VoidData
      extended bycom.davisor.data.VoidValue
          extended bycom.davisor.data.GenericValue
              extended bycom.davisor.data.TextData
                  extended bycom.davisor.data.URLTextData
All Implemented Interfaces:
java.lang.Comparable, Data, DataValue, com.davisor.core.Dupable, java.io.Serializable, SerializableData

public class URLTextData
extends TextData

URLTextData represents URL-encoded text data.

Since:
JDK1.1
See Also:
URLTextType, Serialized Form

Field Summary
 
Fields inherited from class com.davisor.data.TextData
EMPTY
 
Fields inherited from class com.davisor.data.VoidData
M_type
 
Constructor Summary
URLTextData()
          Default constructor.
URLTextData(TextType type, java.lang.String value)
          Creates a new text data object with the given text type and value.
URLTextData(TextType type, java.lang.String value, java.text.ParsePosition status)
          Creates a new text data object with the given text type and value.
 
Method Summary
 DataValue add(DataValue value)
          Adds data values.
 DataValue sub(DataValue value)
          Substracts a data value.
 
Methods inherited from class com.davisor.data.TextData
compareTo, dup, equals, getValue, hashCode, isNull, setValue, toStatement, toString, unit
 
Methods inherited from class com.davisor.data.GenericValue
max, min, toXML
 
Methods inherited from class com.davisor.data.VoidValue
abs, ceil, deinterpolate, div, floor, getFormat, interpolate, mul, negate
 
Methods inherited from class com.davisor.data.VoidData
getDataValue, getType, setType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.davisor.data.Data
getType
 

Constructor Detail

URLTextData

public URLTextData()
Default constructor. Creates a new text data object with the default URLTextType.DEFAULT type.

See Also:
URLTextType

URLTextData

public URLTextData(TextType type,
                   java.lang.String value)
            throws InvalidDataException
Creates a new text data object with the given text type and value.

Parameters:
type - the type of data
value - string value (may be null)
Throws:
InvalidDataException - if the value was invalid
See Also:
TextData.TextData(TextType,String,ParsePosition)

URLTextData

public URLTextData(TextType type,
                   java.lang.String value,
                   java.text.ParsePosition status)
            throws InvalidDataException
Creates a new text data object with the given text type and value.

Parameters:
type - the type of data
value - string value (may be null)
status - parse status (may be null)
Throws:
InvalidDataException - if the value was invalid
See Also:
TextData.setValue(String,ParsePosition)
Method Detail

add

public DataValue add(DataValue value)
              throws InvalidDataException
Adds data values.

Specified by:
add in interface DataValue
Overrides:
add in class TextData
Parameters:
value - a data value to be added to this data value
Returns:
a new data object, sharing the current type of this object
Throws:
InvalidDataException - if the data values cannot be added.

sub

public DataValue sub(DataValue value)
              throws InvalidDataException
Substracts a data value.

Specified by:
sub in interface DataValue
Overrides:
sub in class TextData
Parameters:
value - a data value to be substracted from this data value
Returns:
a new data object, sharing the current type of this object
Throws:
InvalidDataException - if the value cannot be substracted.


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.