As we known,array object in Javascript is very useful for data
structure.Array object can be widely used for collections such as
list,set,hashtable,stack,iterator and so on.But there are not standard
collections object in Javascript,so it's not convenient for data storage.
JsJava offer almost all of the collections:
- 1, BitSet, in the directory jsjava.util
- Each component of the bit set has a boolean value,true or false.You can operate the bit set with AND,OR,XOR and other logic operation.Example as follows:
- 2, Hashtable, in the directory jsjava.util
- Hashtable is very usefull for data storage.Example as follows:
- 3, Iterator, in the directory jsjava.util
- An iterator over a collection.Example as follows:
- 4, List, in the directory jsjava.util
- A list is an ordered collection which allows duplicate elements.Example as follows:
- 5, Properties, in the directory jsjava.util
- A properties is a hashtable,and its key and value are both string.Example as follows:
- 6, Set, in the directory jsjava.util
- A set is a list which allows no duplicate elements.Example as follows:
The display is a,b,c
- 7, Stack, in the directory jsjava.util
- Stack is widely used in many scenes.Example as follows:
The display is dog
With JsJava collections framework,we can meet the requirements of
data storage and operation better.