telosys.objects
Class Map

java.lang.Object
  extended bytelosys.objects.Map

public class Map
extends java.lang.Object

Map class with methods like Java HashMap or Hashtable


Constructor Summary
Map()
           
 
Method Summary
 void clear()
          Clears all values of the map
 boolean containsKey(string key)
          Returns true if the given key exists in the map
 object get(string key)
          Gets the value associated with the given key
 string[] keysArray()
          Returns an array with all keys
 string keysString()
          Returns a string with all keys of the map separated with commas (",")
 void put(string key, object value)
          Puts a value in the map
 void remove(string key)
          Removes the mapping for the given key if it is present
 void show()
          Shows all map content (keys and values) in a standard 'alert window'
 number size()
          Returns the size of the map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Map

public Map()
Method Detail

put

public void put(string key,
                object value)
Puts a value in the map

Parameters:
key - the key
value - the value to put

get

public object get(string key)
Gets the value associated with the given key

Parameters:
key - the key
Returns:
the value

remove

public void remove(string key)
Removes the mapping for the given key if it is present

Parameters:
key - the value of the key to delete

clear

public void clear()
Clears all values of the map


size

public number size()
Returns the size of the map

Returns:
the map size

containsKey

public boolean containsKey(string key)
Returns true if the given key exists in the map

Parameters:
key - the key to check
Returns:
true(the key exists) | false (the key doesn't exist)

keysArray

public string[] keysArray()
Returns an array with all keys

Returns:
all keys

keysString

public string keysString()
Returns a string with all keys of the map separated with commas (",")

Returns:
all keys separated with commas (",")

show

public void show()
Shows all map content (keys and values) in a standard 'alert window'