    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class nsjava.NsSet

    java.lang.Object
       |
       +----nsjava.NsSet

public class NsSet
extends Object

NsSet provides a wrapper around the aolserver ns_set structures.

See Also:
  NsDb, NsLog, NsPg, NsTcl

##

NsSet()
  Create and instance of an NsSet object.
NsSet(String)
  Create and instance of an NsSet object.

##

copy()
  Create a new Ns_Set object.
cput(String, String)
  put the new value in the set if the key doesn't exist already.
create(String)
  Init the NsSet object.
delete(int)
  Delete the entry corresponding to the specified index.
delete(Integer)
  Delete the entry corresponding to the specified index.
finalize()
  Frees the NsSet object.
find(String)
  Find the index corresponding to the specified key.
free()
  Free the NsSet structure.
get(String)
  Get the entry corresponding to the specified key.
getPointer()
  Get the Ns_Set reference pointer
icput(String, String)
  put the new value in the set if the key doesn't exist already(ignore case)
idelkey(String)
  Delete the entry corresponding to the specified key (ignore case).
ifind(String)
  Find the index corresponding to the specified key (ignore case).
iget(String)
  Get the entry corresponding to the specified key (ignore case).
isnull(int)
  Is the value corresponding to the specified index null?
isnull(Integer)
  Is the value corresponding to the specified index null?
iunique(String)
  Is the key unique within this NsSet(ignore case)?
key(int)
  The key of the corresponding index.
key(Integer)
  The key of the corresponding index.
merge(NsSet)
  merge another set with this one.
move(NsSet)
  move another set to this one.
name()
  Get the name of the NsSet object.
print()
  Print the NsSet structure.
put(String, String)
  append the new value in the set.
size()
  Get the number of entries in the NsSet object.
split()
  split an NsSet object - not yet implemented.
truncate(int)
  Truncate the NsSet structure.
truncate(Integer)
  Truncate the NsSet structure.
unique(String)
  Is the key unique within this NsSet?
update(String, String)
  update the entry corresponding to the key.
value(int)
  Get the value corresponding to the specified index.
value(Integer)
  Get the value corresponding to the specified index.

##

NsSet

     public NsSet()

  Create and instance of an NsSet object.

  Returns:
    an NsSet instance.

NsSet

     public NsSet(String ptr)

  Create and instance of an NsSet object.

  Parameters:
    ptr - reference to Ns_Set structure.
  Returns:
    an NsSet instance.

##

getPointer

     public String getPointer()

  Get the Ns_Set reference pointer

  Parameters:
    ptr - reference to Ns_Set structure.
  Returns:
    an NsSet instance.

finalize

     public void finalize()

  Frees the NsSet object.

  Overrides:
    finalize in class Object

create

     public void create(String name)

  Init the NsSet object.

  Parameters:
    name - of the NsSet structure.

copy

     public NsSet copy()

  Create a new Ns_Set object.

  Returns:
    new NsSet instance.

split

     public NsSet split() throws NoSuchMethodException

  split an NsSet object - not yet implemented.

  Returns:
    new NsSet instance.
  Throws: NoSuchMethodException
    for any calls to this method.

size

     public Integer size()

  Get the number of entries in the NsSet object.

  Returns:
    the number of entries.

name

     public String name()

  Get the name of the NsSet object.

  Returns:
    the name.

print

     public void print()

  Print the NsSet structure.

free

     public void free()

  Free the NsSet structure.

find

     public Integer find(String key)

  Find the index corresponding to the specified key.

  Parameters:
    key - the key name.
  Returns:
    the index.

get

     public String get(String key)

  Get the entry corresponding to the specified key.

  Parameters:
    key - the key name.
  Returns:
    the value.

unique

     public boolean unique(String key)

  Is the key unique within this NsSet?

  Parameters:
    key - the key name.
  Returns:
    true/false

ifind

     public Integer ifind(String key)

  Find the index corresponding to the specified key (ignore case).

  Parameters:
    key - the key name.
  Returns:
    the index.

iget

     public String iget(String key)

  Get the entry corresponding to the specified key (ignore case).

  Parameters:
    key - the key name.
  Returns:
    the value.

idelkey

     public void idelkey(String key)

  Delete the entry corresponding to the specified key (ignore case).

  Parameters:
    key - the key name.

iunique

     public boolean iunique(String key)

  Is the key unique within this NsSet(ignore case)?

  Parameters:
    key - the key name.
  Returns:
    true/false

value

     public String value(int index)

  Get the value corresponding to the specified index.

  Parameters:
    index - the index of the value.
  Returns:
    the value.

value

     public String value(Integer index)

  Get the value corresponding to the specified index.

  Parameters:
    index - the index of the value.
  Returns:
    the value.

isnull

     public boolean isnull(int index)

  Is the value corresponding to the specified index null?

  Parameters:
    index - the index of the value.
  Returns:
    true/false

isnull

     public boolean isnull(Integer index)

  Is the value corresponding to the specified index null?

  Parameters:
    index - the index of the value.
  Returns:
    true/false

key

     public String key(int index)

  The key of the corresponding index.

  Parameters:
    idx - the index of the value.
  Returns:
    the key

key

     public String key(Integer index)

  The key of the corresponding index.

  Parameters:
    idx - the index of the value.
  Returns:
    the key

delete

     public void delete(int index)

  Delete the entry corresponding to the specified index.

  Parameters:
    index - the key name.

delete

     public void delete(Integer index)

  Delete the entry corresponding to the specified index.

  Parameters:
    index - the key name.

truncate

     public void truncate(int index)

  Truncate the NsSet structure.

  Parameters:
    index - index of the last entry.

truncate

     public void truncate(Integer index)

  Truncate the NsSet structure.

  Parameters:
    index - index of the last entry.

update

     public Integer update(String key,
                           String val)

  update the entry corresponding to the key.

  Parameters:
    key - the key
    val - the value
  Returns:
    index of updated entry.

icput

     public Integer icput(String key,
                          String val)

  put the new value in the set if the key doesn't exist already(ignore case)

  Parameters:
    key - the key
    val - the value
  Returns:
    index of updated entry.

cput

     public Integer cput(String key,
                         String val)

  put the new value in the set if the key doesn't exist already.

  Parameters:
    key - the key
    val - the value
  Returns:
    index of updated entry.

put

     public Integer put(String key,
                        String val)

  append the new value in the set.

  Parameters:
    key - the key
    val - the value
  Returns:
    index of updated entry.

merge

     public void merge(NsSet low)

  merge another set with this one.

  Parameters:
    low - pointer to the other Ns_Set structure.

move

     public void move(NsSet from)

  move another set to this one.

  Parameters:
    from - the other Ns_Set structure.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index