com.mapinfo.midev.feature.impl

## Class AllType

- java.lang.Object
- - com.mapinfo.midev.feature.impl.AllType

All Implemented Interfaces:
  IAttributeValue, Serializable

    public class AllType
    extends Object
    implements IAttributeValue

An implementation of IAttributeValue that can change type to reflect the stored value.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`AllType()` Constructs a typeless null value AllType.
`AllType(boolean z)` Constructs a boolean AllType.
`AllType(byte b)` Constructs a byte AllType.
`AllType(byte[] b)` Constructs a binary AllType.
`AllType(char c)` Constructs a char AllType.
`AllType(double d)` Constructs a double AllType.
`AllType(float f)` Constructs a float AllType.
`AllType(IFeature f)` Constructs a feature AllType.
`AllType(IFeatureCollection f)` Constructs a feature collection AllType.
`AllType(IFeatureGeometry g)` Constructs a feature geometry AllType.
`AllType(IMultiFeatureCollection f)` Constructs a multi-feature collection AllType.
`AllType(int i)` Constructs an integer AllType.
`AllType(IRasterDataset r)` Constructs a raster AllType.
`AllType(IStyle s)` Constructs a style AllType.
`AllType(long l)` Constructs a long AllType.
`AllType(MIDate d)` Constructs a date AllType.
`AllType(MIDateTime d)` Constructs a date-time AllType.
`AllType(MIDateTimeZone d)` Constructs a date-time-timezone AllType.
`AllType(MITime t)` Constructs a time AllType.
`AllType(MITimespan t)` Constructs a timespan AllType.
`AllType(short s)` Constructs a short AllType.
`AllType(String s)` Constructs a string AllType.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)` Returns true if Compare.Compare(this, o)==CompareResult.EQUAL and o is an AllType.
`byte[]` `getBinary()` Gets the value of the attribute.
`boolean` `getBoolean()` Gets the value of the attribute.
`byte` `getByte()` Gets the value of the attribute.
`char` `getChar()` Gets the value of the attribute.
`AllType` `getCopy()` Returns a deep copy of this AllType.
`AttributeType` `getDataType()` Indicates the data type of the attribute.
`MIDate` `getDate()` Gets the value of the attribute.
`MIDateTime` `getDateTime()` Gets the value of the attribute.
`MIDateTimeZone` `getDateTimeZone()` Gets the value of the attribute.
`double` `getDouble()` Gets the value of the attribute.
`IFeature` `getFeature()` Gets the value of the attribute.
`IFeatureCollection` `getFeatureCollection()` Gets the value of the attribute.
`IFeatureGeometry` `getFeatureGeometry()` Gets the value of the attribute.
`float` `getFloat()` Gets the value of the attribute.
`int` `getInt()` Gets the value of the attribute.
`long` `getLong()` Gets the value of the attribute.
`IMultiFeatureCollection` `getMultiFeatureCollection()` Gets the value of the attribute.
`IRasterDataset` `getRasterDataset()` Gets the value of the attribute.
`short` `getShort()` Gets the value of the attribute.
`String` `getString()` Gets the value of the attribute.
`IStyle` `getStyle()` Gets the value of the attribute.
`MITime` `getTime()` Gets the value of the attribute.
`MITimespan` `getTimespan()` Gets the value of the attribute.
`int` `hashCode()`
`boolean` `isNull()` Indicates if the value of the attribute is null.
`void` `setBinary(byte[] b)` Sets the value of the attribute.
`void` `setBoolean(boolean z)` Sets the value of the attribute.
`void` `setByte(byte b)` Sets the value of the attribute.
`void` `setChar(char c)` Sets the value of the attribute.
`void` `setDate(MIDate d)` Sets the value of the attribute.
`void` `setDateTime(MIDateTime d)` Sets the value of the attribute.
`void` `setDateTimeZone(MIDateTimeZone d)` Sets the value of the attribute.
`void` `setDouble(double d)` Sets the value of the attribute.
`void` `setFeature(IFeature f)` Sets the value of the attribute.
`void` `setFeatureCollection(IFeatureCollection f)` Sets the value of the attribute.
`void` `setFeatureGeometry(IFeatureGeometry g)` Sets the value of the attribute.
`void` `setFloat(float f)` Sets the value of the attribute.
`void` `setFromFeature(IFeature feature, int attributeIndex, boolean bDeepCopy)` Note this should be a non-transient operation.
`void` `setInt(int i)` Sets the value of the attribute.
`void` `setLong(long l)` Sets the value of the attribute.
`void` `setMultiFeatureCollection(IMultiFeatureCollection f)` Sets the value of the attribute.
`void` `setNull()` Sets the value of the attribute to `null`.
`void` `setRasterDataset(IRasterDataset r)` Sets the value of the attribute.
`void` `setShort(short s)` Sets the value of the attribute.
`void` `setString(String s)` Sets the value of the attribute.
`void` `setStyle(IStyle s)` Sets the value of the attribute.
`void` `setTime(MITime t)` Sets the value of the attribute.
`void` `setTimespan(MITimespan t)` Sets the value of the attribute.
`void` `setValue(AllType from)` Sets the value of this AllType to match the input AllType.
`void` `setValue(IAttributeValue from, boolean bDeepCopy)` Note this should be a non-transient operation.
`void` `setValue(Object o)`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AllType

    public AllType()

Constructs a typeless null value AllType.

#### AllType

    public AllType(boolean z)

Constructs a boolean AllType.

Parameters:
  `z` - The value to store in the AllType.

#### AllType

    public AllType(byte b)

Constructs a byte AllType.

Parameters:
  `b` - The value to store in the AllType.

#### AllType

    public AllType(char c)

Constructs a char AllType.

Parameters:
  `c` - The value to store in the AllType.

#### AllType

    public AllType(short s)

Constructs a short AllType.

Parameters:
  `s` - The value to store in the AllType.

#### AllType

    public AllType(int i)

Constructs an integer AllType.

Parameters:
  `i` - The value to store in the AllType.

#### AllType

    public AllType(long l)

Constructs a long AllType.

Parameters:
  `l` - The value to store in the AllType.

#### AllType

    public AllType(float f)

Constructs a float AllType.

Parameters:
  `f` - The value to store in the AllType.

#### AllType

    public AllType(double d)

Constructs a double AllType.

Parameters:
  `d` - The value to store in the AllType.

#### AllType

    public AllType(String s)

Constructs a string AllType.

Parameters:
  `s` - The value to store in the AllType.

#### AllType

    public AllType(byte[] b)

Constructs a binary AllType.

Parameters:
  `b` - The value to store in the AllType.

#### AllType

    public AllType(MIDate d)

Constructs a date AllType.

Parameters:
  `d` - The value to store in the AllType.

#### AllType

    public AllType(MITime t)

Constructs a time AllType.

Parameters:
  `t` - The value to store in the AllType.

#### AllType

    public AllType(MIDateTime d)

Constructs a date-time AllType.

Parameters:
  `d` - The value to store in the AllType.

#### AllType

    public AllType(MIDateTimeZone d)

Constructs a date-time-timezone AllType.

Parameters:
  `d` - The value to store in the AllType.

#### AllType

    public AllType(MITimespan t)

Constructs a timespan AllType.

Parameters:
  `t` - The value to store in the AllType.

#### AllType

    public AllType(IFeatureGeometry g)

Constructs a feature geometry AllType.

Parameters:
  `g` - The value to store in the AllType.

#### AllType

    public AllType(IStyle s)

Constructs a style AllType.

Parameters:
  `s` - The value to store in the AllType.

#### AllType

    public AllType(IRasterDataset r)

Constructs a raster AllType.

Parameters:
  `r` - The value to store in the AllType.

#### AllType

    public AllType(IFeature f)

Constructs a feature AllType.

Parameters:
  `f` - The value to store in the AllType.

#### AllType

    public AllType(IFeatureCollection f)

Constructs a feature collection AllType.

Parameters:
  `f` - The value to store in the AllType.

#### AllType

    public AllType(IMultiFeatureCollection f)

Constructs a multi-feature collection AllType.

Parameters:
  `f` - The value to store in the AllType.

### Method Detail

#### getDataType

    public AttributeType getDataType()

Description copied from interface: `IAttributeValue`
Indicates the data type of the attribute.

Specified by:
  `getDataType` in interface `IAttributeValue`
Returns:
  the data type of the attribute.

#### getCopy

    public AllType getCopy()

Returns a deep copy of this AllType.

Specified by:
  `getCopy` in interface `IAttributeValue`
Returns:
  a deep copy of this AllType.

#### setValue

    public void setValue(AllType from)

Sets the value of this AllType to match the input AllType. Object values are not deep copied.

Parameters:
  `from` - The AllType to copy from.

#### setValue

    public void setValue(IAttributeValue from,
                         boolean bDeepCopy)

Description copied from interface: `IAttributeValue`
Note this should be a non-transient operation.

Specified by:
  `setValue` in interface `IAttributeValue`
Parameters:
  `from` - - The value to set this attribute to.
  `bDeepCopy` - - True if the from value should be deep copied.

#### setValue

    public void setValue(Object o)

#### setFromFeature

    public void setFromFeature(IFeature feature,
                               int attributeIndex,
                               boolean bDeepCopy)

Description copied from interface: `IAttributeValue`
Note this should be a non-transient operation.

Specified by:
  `setFromFeature` in interface `IAttributeValue`
Parameters:
  `feature` - - The feature containing the data this attribute is to be set to.
  `attributeIndex` - - The index of the attribute
  `bDeepCopy` - - True if the from value should be deep copied.

#### isNull

    public boolean isNull()

Description copied from interface: `IAttributeValue`
Indicates if the value of the attribute is null. The typed accessor methods such as `getString` and `getInt` will throw an exception if the value for the attribute is null. Users should first check for null values using this method.

Specified by:
  `isNull` in interface `IAttributeValue`
Returns:
  `true` if the value for the attribute is null; `false` otherwise.

#### setNull

    public void setNull()

Description copied from interface: `IAttributeValue`
Sets the value of the attribute to `null`. Attributes do not represent null using a value within the domain of the attribute type. For example, a string attribute is not set to null by calling `setString` and passing in a null string referenece for the value. This will generate an exception. To set a value to null, use the setNull method.

Specified by:
  `setNull` in interface `IAttributeValue`

#### getBoolean

    public boolean getBoolean()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getBoolean` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setBoolean

    public void setBoolean(boolean z)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setBoolean` in interface `IAttributeValue`
Parameters:
  `z` - the new value for the attribute.

#### getByte

    public byte getByte()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getByte` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setByte

    public void setByte(byte b)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setByte` in interface `IAttributeValue`
Parameters:
  `b` - the new value for the attribute.

#### getChar

    public char getChar()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getChar` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setChar

    public void setChar(char c)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setChar` in interface `IAttributeValue`
Parameters:
  `c` - the new value for the attribute.

#### getShort

    public short getShort()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getShort` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setShort

    public void setShort(short s)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setShort` in interface `IAttributeValue`
Parameters:
  `s` - the new value for the attribute.

#### getInt

    public int getInt()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getInt` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setInt

    public void setInt(int i)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setInt` in interface `IAttributeValue`
Parameters:
  `i` - the new value for the attribute.

#### getLong

    public long getLong()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getLong` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setLong

    public void setLong(long l)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setLong` in interface `IAttributeValue`
Parameters:
  `l` - the new value for the attribute.

#### getFloat

    public float getFloat()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getFloat` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setFloat

    public void setFloat(float f)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setFloat` in interface `IAttributeValue`
Parameters:
  `f` - the new value for the attribute.

#### getDouble

    public double getDouble()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getDouble` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setDouble

    public void setDouble(double d)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setDouble` in interface `IAttributeValue`
Parameters:
  `d` - the new value for the attribute.

#### getString

    public String getString()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getString` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setString

    public void setString(String s)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setString` in interface `IAttributeValue`
Parameters:
  `s` - the new value for the attribute.

#### getBinary

    public byte[] getBinary()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getBinary` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setBinary

    public void setBinary(byte[] b)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setBinary` in interface `IAttributeValue`
Parameters:
  `b` - the new value for the attribute.

#### getDate

    public MIDate getDate()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getDate` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setDate

    public void setDate(MIDate d)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setDate` in interface `IAttributeValue`
Parameters:
  `d` - the new value for the attribute.

#### getTime

    public MITime getTime()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getTime` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setTime

    public void setTime(MITime t)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setTime` in interface `IAttributeValue`
Parameters:
  `t` - the new value for the attribute.

#### getDateTime

    public MIDateTime getDateTime()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getDateTime` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setDateTime

    public void setDateTime(MIDateTime d)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setDateTime` in interface `IAttributeValue`
Parameters:
  `d` - the new value for the attribute.

#### getDateTimeZone

    public MIDateTimeZone getDateTimeZone()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getDateTimeZone` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setDateTimeZone

    public void setDateTimeZone(MIDateTimeZone d)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setDateTimeZone` in interface `IAttributeValue`
Parameters:
  `d` - the new value for the attribute.

#### getTimespan

    public MITimespan getTimespan()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getTimespan` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setTimespan

    public void setTimespan(MITimespan t)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setTimespan` in interface `IAttributeValue`
Parameters:
  `t` - the new value for the attribute.

#### getFeatureGeometry

    public IFeatureGeometry getFeatureGeometry()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getFeatureGeometry` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setFeatureGeometry

    public void setFeatureGeometry(IFeatureGeometry g)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setFeatureGeometry` in interface `IAttributeValue`
Parameters:
  `g` - the new value for the attribute.

#### getStyle

    public IStyle getStyle()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getStyle` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setStyle

    public void setStyle(IStyle s)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setStyle` in interface `IAttributeValue`
Parameters:
  `s` - the new value for the attribute.

#### getRasterDataset

    public IRasterDataset getRasterDataset()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

Specified by:
  `getRasterDataset` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setRasterDataset

    public void setRasterDataset(IRasterDataset r)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setRasterDataset` in interface `IAttributeValue`
Parameters:
  `r` - the new value for the attribute.

#### getFeature

    public IFeature getFeature()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

todo: Include a section at the top of this interface or maybe in the Feature Package level docs about type extensibility and refer to that here....

Specified by:
  `getFeature` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setFeature

    public void setFeature(IFeature f)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setFeature` in interface `IAttributeValue`
Parameters:
  `f` - the new value for the attribute.

#### getFeatureCollection

    public IFeatureCollection getFeatureCollection()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

todo: Include a section at the top of this interface or maybe in the Feature Package level docs about type extensibility and refer to that here....

Specified by:
  `getFeatureCollection` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setFeatureCollection

    public void setFeatureCollection(IFeatureCollection f)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setFeatureCollection` in interface `IAttributeValue`
Parameters:
  `f` - the new value for the attribute.

#### getMultiFeatureCollection

    public IMultiFeatureCollection getMultiFeatureCollection()

Description copied from interface: `IAttributeValue`
Gets the value of the attribute. If the value is `null`, an exception will be thrown. Users must check for null values before attempting to access a typed value accessor method.

todo: Include a section at the top of this interface or maybe in the Feature Package level docs about type extensibility and refer to that here....

Specified by:
  `getMultiFeatureCollection` in interface `IAttributeValue`
Returns:
  the value for the attribute.
See Also:
  `IAttributeValue.isNull()`

#### setMultiFeatureCollection

    public void setMultiFeatureCollection(IMultiFeatureCollection f)

Description copied from interface: `IAttributeValue`
Sets the value of the attribute.

Specified by:
  `setMultiFeatureCollection` in interface `IAttributeValue`
Parameters:
  `f` - the new value for the attribute.

#### equals

    public boolean equals(Object o)

Returns true if Compare.Compare(this, o)==CompareResult.EQUAL and o is an AllType.

Overrides:
  `equals` in class `Object`
Parameters:
  `o` - Another object to test for equality.
Returns:
  true if Compare.Compare(this, o)==CompareResult.EQUAL and o is an AllType.

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`