GridNameCollection

Inheritance: java.lang.Object

public class GridNameCollection

Encapsulates a collection of GridName objects.

Methods

MethodDescription
add(int sheetIndex, String text, String refersTo)Defines a new name in the specified sheet.
add(String text, String refersTo)Defines a new global name.
clear()Removes all Names;
equals(Object arg0)
get(int index)Gets the GridName element at the specified index.
getClass()
getCount()Gets the size of enumerator
hashCode()
iterator()Gets the rows enumerator
notify()
notifyAll()
remove(String[] names)Remove an array of name
removeAt(int index)Remove the name at the specific index.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

add(int sheetIndex, String text, String refersTo)

public int add(int sheetIndex, String text, String refersTo)

Defines a new name in the specified sheet.

Parameters:

ParameterTypeDescription
sheetIndexintThe sheet index that the name is applyed in.
textjava.lang.StringName text.It can not have sheetname .
refersTojava.lang.StringThe formula that the name is defined to refer to.It must have sheetname .eg.‘sheet hello!‘A1:B2.

Returns: int - Name object index.

add(String text, String refersTo)

public int add(String text, String refersTo)

Defines a new global name.

Parameters:

ParameterTypeDescription
textjava.lang.StringName text.It can have sheetname .
refersTojava.lang.StringThe formula that the name is defined to refer to.It must have a sheetname .eg.‘sheet hello!‘A1:B2.

Returns: int - Name object index.

clear()

public void clear()

Removes all Names;

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

get(int index)

public GridName get(int index)

Gets the GridName element at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero based index of the element.

Returns: GridName - The element at the specified index.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCount()

public int getCount()

Gets the size of enumerator

Returns: int

hashCode()

public native int hashCode()

Returns: int

iterator()

public Iterator iterator()

Gets the rows enumerator

Returns: java.util.Iterator - The rows enumerator

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

remove(String[] names)

public void remove(String[] names)

Remove an array of name

Parameters:

ParameterTypeDescription
namesjava.lang.String[]The names’ text.

removeAt(int index)

public void removeAt(int index)

Remove the name at the specific index.

Remarks

Please make sure that the name is not referred by the other formulas before calling the method. And if the name is referred,please only set Name.RefersTo as null.

Parameters:

ParameterTypeDescription
indexint

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int