How to input words in sentences into unique list
<p>Hello guys maybe you maybe can help . here is my problem</p>

<p>For example : "I am running all over the time every time with my dog and my sister"</p>

<p>I want to have a list containing all the unique words from the above sentences :</p>

<p>List data = {I,am,running,all,over,the,time,every,with,my,dog,and,sister}</p>

<p>I already tried this code below but it runs slow with big sentences</p>

<pre><code>List textList = new ArrayList();
    StringTokenizer stringTokenizer = new StringTokenizer(text);

    while (stringTokenizer.hasMoreElements()) {
        String tokenData = (String) stringTokenizer.nextElement();
        if ((textList.size() &gt; 0)) {
            Boolean exist = false;
            for (int i = 0; i &lt; textList.size(); i++) {
                if (tokenData.toLowerCase().equals(
                        textList.get(i).toString().toLowerCase()))
                    exist = true;
            }
            if (exist == false)
                textList.add(tokenData);
        } else {
            textList.add(tokenData);
        }

    }
</code></pre>

<p>Is there anyway other than this faster way but same result . I appreciate your reply thx</p>
