com.esri.arcgis.datasourcesraster
Class UniqueValues

java.lang.Object
  extended by com.esri.arcgis.datasourcesraster.UniqueValues
All Implemented Interfaces:
IUniqueDoubleValues, IUniqueStringValues, IUniqueValues, IUniqueValues2, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, IXMLSerialize, Externalizable, Serializable

public class UniqueValues
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IUniqueValues, IUniqueValues2, IUniqueStringValues, IUniqueDoubleValues, IPersist, IPersistStream, IXMLSerialize, Externalizable

A raster unique value class.

Description

The UniqueValues object creates and maintains a list of unique values and the associated counts. UniqueValues is a helper object that provides pixel value information, the unique values and the associated counts, of a raster for RasterUniqueValueRenderer and RasterClassifyColorRampRenderer objects. The UniqueValues can be obtained either by co-creating from this object or by calculating using RasterCalcUniqueValues object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
UniqueValues()
          Constructs a UniqueValues using ArcGIS Engine.
UniqueValues(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
UniqueValues theUniqueValues = (UniqueValues) obj;
 
Method Summary
 int add(double value, int count)
          Adds a value if necessary and returns its value ID.
 int add(int value, int count)
          Adds a value if necessary and returns its value ID.
 int add(String value, int count)
          Adds a value if necessary and returns its value ID.
 void delete(double value)
          Deletes a value.
 void delete(int value)
          Deletes a value.
 void delete(String value)
          Deletes a value.
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 void empty()
          Empties unique values.
 boolean equals(Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 int getCount()
          The total number of unique values.
 void getHistogram(Object[] pUniqueValues, Object[] pCounts)
          The historgram of values.
 void getLargeHistogram(Object[] pUniqueValues, Object[] pCounts)
          The historgram of values.
 double getLargeUniqueCount(int idnex)
          The unique value count at a given index.
 int getMax()
          The maximum of values.
 int getMin()
          The minimum of values.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int getUniqueCount(int idnex)
          The unique value count at a given index.
 Object getUniqueValue(int index)
          The unique value at a given index.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 void load(IStream pstm)
          load
 int lookup(double value)
          Looks up unique index of a given value.
 int lookup(int value)
          Looks up unique index of a given value.
 int lookup(String value)
          Looks up unique index of a given value.
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

UniqueValues

public UniqueValues()
             throws IOException,
                    UnknownHostException
Constructs a UniqueValues using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

UniqueValues

public UniqueValues(Object obj)
             throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
UniqueValues theUniqueValues = (UniqueValues) obj;

Construct a UniqueValues using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to UniqueValues.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

lookup

public int lookup(int value)
           throws IOException,
                  AutomationException
Looks up unique index of a given value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
lookup in interface IUniqueValues
Parameters:
value - The value (in)
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

public int add(int value,
               int count)
        throws IOException,
               AutomationException
Adds a value if necessary and returns its value ID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
add in interface IUniqueValues
Parameters:
value - The value (in)
count - The count (in)
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delete

public void delete(int value)
            throws IOException,
                   AutomationException
Deletes a value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
delete in interface IUniqueValues
Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

empty

public void empty()
           throws IOException,
                  AutomationException
Empties unique values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
empty in interface IUniqueValues
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUniqueValue

public Object getUniqueValue(int index)
                      throws IOException,
                             AutomationException
The unique value at a given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getUniqueValue in interface IUniqueValues
Parameters:
index - The index (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUniqueCount

public int getUniqueCount(int idnex)
                   throws IOException,
                          AutomationException
The unique value count at a given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getUniqueCount in interface IUniqueValues
Parameters:
idnex - The idnex (in)
Returns:
The uniqueCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

public int getCount()
             throws IOException,
                    AutomationException
The total number of unique values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCount in interface IUniqueValues
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMin

public int getMin()
           throws IOException,
                  AutomationException
The minimum of values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMin in interface IUniqueValues
Returns:
The min
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMax

public int getMax()
           throws IOException,
                  AutomationException
The maximum of values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMax in interface IUniqueValues
Returns:
The max
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHistogram

public void getHistogram(Object[] pUniqueValues,
                         Object[] pCounts)
                  throws IOException,
                         AutomationException
The historgram of values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getHistogram in interface IUniqueValues
Parameters:
pUniqueValues - A Variant (out: use single element array)
pCounts - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLargeUniqueCount

public double getLargeUniqueCount(int idnex)
                           throws IOException,
                                  AutomationException
The unique value count at a given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getLargeUniqueCount in interface IUniqueValues2
Parameters:
idnex - The idnex (in)
Returns:
The uniqueCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLargeHistogram

public void getLargeHistogram(Object[] pUniqueValues,
                              Object[] pCounts)
                       throws IOException,
                              AutomationException
The historgram of values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getLargeHistogram in interface IUniqueValues2
Parameters:
pUniqueValues - A Variant (out: use single element array)
pCounts - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

lookup

public int lookup(String value)
           throws IOException,
                  AutomationException
Looks up unique index of a given value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
lookup in interface IUniqueStringValues
Parameters:
value - The value (in)
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

public int add(String value,
               int count)
        throws IOException,
               AutomationException
Adds a value if necessary and returns its value ID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
add in interface IUniqueStringValues
Parameters:
value - The value (in)
count - The count (in)
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delete

public void delete(String value)
            throws IOException,
                   AutomationException
Deletes a value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
delete in interface IUniqueStringValues
Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

lookup

public int lookup(double value)
           throws IOException,
                  AutomationException
Looks up unique index of a given value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
lookup in interface IUniqueDoubleValues
Parameters:
value - The value (in)
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

public int add(double value,
               int count)
        throws IOException,
               AutomationException
Adds a value if necessary and returns its value ID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
add in interface IUniqueDoubleValues
Parameters:
value - The value (in)
count - The count (in)
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delete

public void delete(double value)
            throws IOException,
                   AutomationException
Deletes a value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
delete in interface IUniqueDoubleValues
Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

serialize

public void serialize(IXMLSerializeData data)
               throws IOException,
                      AutomationException
Serializes an object to XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
serialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deserialize

public void deserialize(IXMLSerializeData data)
                 throws IOException,
                        AutomationException
Deserializes an object from XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
deserialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException