Code example for Stack

Methods: add

0
    } 
     
    private void startNavigating(String word, boolean pushHistory) {
        // Push any current word onto the history stack 
        if (!TextUtils.isEmpty(mEntryTitle) && pushHistory) {
            mHistory.add(mEntryTitle);
        } 
 
        // Start lookup for new word in background 
        new LookupTask().execute(word);
    } 
 
    private class LookupTask extends AsyncTask<String, String, String> {
        @Override 
        protected String doInBackground(String... args) {
            String query = args[0];
            String parsedText = null;
 
            try { 
                // If query word is null, assume request for random word 
                if (query == null) {