dbXML API

## org.dbxml.core.objects
Class Variant

    java.lang.Object
      |
      +--org.dbxml.core.objects.Variant

public final class Variant
extends java.lang.Object

Variant is a generic type that can be used to store any type of dbXML variable. Variants will do their best to convert the value that they store to any requested type.

Constructor Summary
`Variant()`
`Variant(Args value)`
`Variant(boolean value)`
`Variant(byte value)`
`Variant(char value)`
`Variant(org.w3c.dom.Document value)`
`Variant(org.w3c.dom.DocumentFragment value)`
`Variant(double value)`
`Variant(org.w3c.dom.Element value)`
`Variant(float value)`
`Variant(int value)`
`Variant(long value)`
`Variant(java.lang.Object value)`
`Variant(short value)`
`Variant(java.lang.String value)`
`Variant(Variant value)`

Method Summary
`Args` `getArgs()` getArgs returns the value as an Args instance.
`boolean` `getBoolean()` getBoolean returns the value as a boolean.
`byte` `getByte()` getByte returns the value as a byte.
`char` `getChar()` getChar returns the value as a char.
`org.w3c.dom.Document` `getDocument()` getDocument returns the value as a Document.
`org.w3c.dom.DocumentFragment` `getDocumentFragment()` getDocumentFragment returns the value as a DocumentFragment.
`double` `getDouble()` getDouble returns the value as a double.
`org.w3c.dom.Element` `getElement()` getElement returns the value as an Element.
`float` `getFloat()` getFloat returns the value as a float.
`int` `getInt()` getInt returns the value as an int.
`long` `getLong()` getLong returns the value as a long.
`java.lang.Object` `getObject()` getObject returns the value as an Object.
`short` `getShort()` getShort returns the value as a short.
`java.lang.String` `getString()` getString returns the value as a String.
`int` `getType()` getType returns the type of the variable being stored in the Variant.
`boolean` `isNull()` isNull returns whether or not the variable is storing a null value.
`void` `set(Args value)` set sets the value as an Args instance.
`void` `set(boolean value)` set sets the value as a boolean.
`void` `set(byte value)` set sets the value as a byte.
`void` `set(char value)` set sets the value as a char.
`void` `set(org.w3c.dom.Document value)` set sets the value as a Document.
`void` `set(org.w3c.dom.DocumentFragment value)` set sets the value as a DocumentFragment.
`void` `set(double value)` set sets the value as a double.
`void` `set(org.w3c.dom.Element value)` set sets the value as an Element.
`void` `set(float value)` set sets the value as a float.
`void` `set(int value)` set sets the value as an int.
`void` `set(long value)` set sets the value as a long.
`void` `set(java.lang.Object object)` set sets the value as an Object.
`void` `set(short value)` set sets the value as a short
`void` `set(java.lang.String value)` set sets the value as a String.
`java.lang.String` `toString()` toString returns the value as a Stringified representation.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Variant

    public Variant()

### Variant

    public Variant(Variant value)

### Variant

    public Variant(java.lang.String value)

### Variant

    public Variant(boolean value)

### Variant

    public Variant(byte value)

### Variant

    public Variant(char value)

### Variant

    public Variant(short value)

### Variant

    public Variant(int value)

### Variant

    public Variant(long value)

### Variant

    public Variant(float value)

### Variant

    public Variant(double value)

### Variant

    public Variant(org.w3c.dom.Element value)

### Variant

    public Variant(org.w3c.dom.Document value)

### Variant

    public Variant(org.w3c.dom.DocumentFragment value)

### Variant

    public Variant(Args value)

### Variant

    public Variant(java.lang.Object value)

Method Detail

### getType

    public int getType()

  getType returns the type of the variable being stored in the Variant.
  Returns:
    The variable type

### isNull

    public boolean isNull()

  isNull returns whether or not the variable is storing a null value.

### set

    public void set(java.lang.String value)

  set sets the value as a String.
  Parameters:
    `value` - The value

### set

    public void set(boolean value)

  set sets the value as a boolean.
  Parameters:
    `value` - The value

### set

    public void set(byte value)

  set sets the value as a byte.
  Parameters:
    `value` - The value

### set

    public void set(char value)

  set sets the value as a char.
  Parameters:
    `value` - The value

### set

    public void set(short value)

  set sets the value as a short
  Parameters:
    `value` - The value

### set

    public void set(int value)

  set sets the value as an int.
  Parameters:
    `value` - The value

### set

    public void set(long value)

  set sets the value as a long.
  Parameters:
    `value` - The value

### set

    public void set(float value)

  set sets the value as a float.
  Parameters:
    `value` - The value

### set

    public void set(double value)

  set sets the value as a double.
  Parameters:
    `value` - The value

### set

    public void set(org.w3c.dom.Element value)

  set sets the value as an Element.
  Parameters:
    `value` - The value

### set

    public void set(org.w3c.dom.Document value)

  set sets the value as a Document.
  Parameters:
    `value` - The value

### set

    public void set(org.w3c.dom.DocumentFragment value)

  set sets the value as a DocumentFragment.
  Parameters:
    `value` - The value

### set

    public void set(Args value)

  set sets the value as an Args instance.
  Parameters:
    `value` - The value

### set

    public void set(java.lang.Object object)

  set sets the value as an Object.
  Parameters:
    `value` - The value

### getString

    public java.lang.String getString()

  getString returns the value as a String.
  Returns:
    The value

### getBoolean

    public boolean getBoolean()

  getBoolean returns the value as a boolean.
  Returns:
    The value

### getByte

    public byte getByte()

  getByte returns the value as a byte.
  Returns:
    The value

### getChar

    public char getChar()

  getChar returns the value as a char.
  Returns:
    The value

### getShort

    public short getShort()

  getShort returns the value as a short.
  Returns:
    The value

### getInt

    public int getInt()

  getInt returns the value as an int.
  Returns:
    The value

### getLong

    public long getLong()

  getLong returns the value as a long.
  Returns:
    The value

### getFloat

    public float getFloat()

  getFloat returns the value as a float.
  Returns:
    The value

### getDouble

    public double getDouble()

  getDouble returns the value as a double.
  Returns:
    The value

### getElement

    public org.w3c.dom.Element getElement()

  getElement returns the value as an Element.
  Returns:
    The value

### getDocument

    public org.w3c.dom.Document getDocument()

  getDocument returns the value as a Document.
  Returns:
    The value

### getDocumentFragment

    public org.w3c.dom.DocumentFragment getDocumentFragment()

  getDocumentFragment returns the value as a DocumentFragment.
  Returns:
    The value

### getArgs

    public Args getArgs()

  getArgs returns the value as an Args instance.
  Returns:
    The value

### getObject

    public java.lang.Object getObject()

  getObject returns the value as an Object.
  Returns:
    The value

### toString

    public java.lang.String toString()

  toString returns the value as a Stringified representation.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    The stringified value

dbXML API

Copyright (c) 1999-2001 The dbXML Group, All rights reserved