Data Structures - Collections

Data Structures by Java 1.x

Enumeration
BitSet
Vector
Stack
Dictionary
Hashtable
Properties

Enumeration is a interface, it is not a data structure concept but it is important to know this in context of DS. it is to retrieve successive elements from a DS using the below methods.
      .nextElement()
      .hasMoreElements()

BitSet is a class and special type of array that holds bit values.

Vector class is a similar to java array, except that it can grow as necessary to accommodate new element. No need to specify size when creation.

Stack is combination of Vector and LIFO which has some methods in it.
     .empty()
     .peek()
     .pop()
     .push()
     .search()

Dictionary is a abstract class which is used to store the information in key-value format. This is same as Map concept of java 2.0.

Hashtable was part of java.util and concrete implementation of a Dictionary. similar to HashMap in 2.0 but is synchronized.

Properties is a sub class of Hashtable to maintain list of values in which key values are strings.





No comments:

Post a Comment