Some important operation sequence table

ArrayList common operations:
constructor:
ArrayList (); empty conformation-sequence table, the capacity of the default capacity
ArrayList (int capacity); configured empty sequence table capacity Capacity
ArrayList (Collection C); Constructs a sequence table, the C all the elements into the sequential list
List <Integer> = Arrays.asList Origin (1,2,3,4,5);
the ArrayList <Integer> = new new List the ArrayList <> (Origin);
common methods:
the Add (E element); tail interpolated data
add (int index, E element) ; elements inserted into the position index
remove (Object o); deleting the first sequence table E
remove (int index); subscript index deletion order position in the table element
contains (E e); Analyzing e is absent sequence table (lookup)
the indexOf (E e); when the number of the front subscript
lastIndexOf (E e); after subscripts
get (int index); returns the index of the element
set (int index, E e); change the index of the element

Guess you like

Origin blog.51cto.com/14232274/2433027