|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IJIEnumVARIANT
j-Interop class corresponding to COM IEnumVARIANT
Interface.
Sample Usage:-
//From MSEnumVariant example
JIVariant variant = dispatch.get("_NewEnum");
IJIComObject object2 = JIComFactory.createCOMInstance(dispatch,variant.getObjectAsInterfacePointer());
IJIEnumVARIANT enumVARIANT = (IJIEnumVARIANT)JIComFactory.createCOMInstance(IJIEnumVARIANT.IID,object2);
for (i = 0; i < 10; i++)
{
Object[] values = enumVARIANT.next(1);
JIArray array = (JIArray)values[0];
Object[] arrayObj = (Object[])array.getArrayInstance();
for (int j = 0; j < arrayObj.length; j++)
{
System.out.println(((JIVariant)arrayObj[j]).getObjectAsInt() + "," + ((Integer)values[1]).intValue());
}
}
Field Summary | |
---|---|
static java.lang.String |
IID
IID representing the COM IEnumVARIANT . |
Method Summary | |
---|---|
IJIEnumVARIANT |
Clone()
From MSDN:- Creates a copy of the current state of enumeration. |
java.lang.Object[] |
next(int celt)
From MSDN:- Attempts to get the next celt items in the enumeration sequence. |
void |
reset()
From MSDN:- Resets the enumeration sequence to the beginning. |
void |
skip(int celt)
From MSDN:- Attempts to skip over the next celt elements in the enumeration sequence. |
Field Detail |
---|
static final java.lang.String IID
IEnumVARIANT
.
Method Detail |
---|
java.lang.Object[] next(int celt) throws JIException
celt
- The number of elements to be returned.
JIException
void skip(int celt) throws JIException
celt
- The number of elements to skip.
JIException
void reset() throws JIException
JIException
IJIEnumVARIANT Clone() throws JIException
There is no guarantee that exactly the same set of variants will be enumerated the second time as was
enumerated the first. Although an exact duplicate is desirable, the outcome depends on the collection
being enumerated. You may find that it is impractical for some collections to maintain this condition
(for example, an enumeration of the files in a directory).
JIException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |