Code example for Vector

Methods: add, size

0
 
            /** 
             * Add a new message to the list and update the View. 
             */ 
            public void add(ConsoleMessage consoleMessage) {
                mMessages.add(consoleMessage);
                notifyDataSetChanged();
            } 
 
            /** 
             * Remove all messages from the list and update the view. 
             */ 
            public void clear() { 
                mMessages.clear();
                notifyDataSetChanged();
            } 
 
            @Override 
            public boolean areAllItemsEnabled() { 
                return false; 
            } 
 
            @Override 
            public boolean isEnabled(int position) {
                return false; 
            } 
 
            public long getItemId(int position) {
                return position;
            } 
 
            public Object getItem(int position) {
                return mMessages.get(position);
            } 
 
            public int getCount() { 
                return mMessages.size();
            } 
 
            @Override 
            public boolean hasStableIds() { 
                return true;