how to automatically rename object in java
<p>I have list of String. 
<code>List&lt;String&gt; elements= new ArrayList&lt;String&gt;();</code> 
when I wanna add new String </p>

<p>elements.add("element");</p>

<p>with name which is my arraylist I wanna to automatically rename to _[a-z...] as windows rename file when there are two same... so for example I have in arraylist "element" when I add element again I wanna to rename automatically to element_a ... so </p>

<pre><code>    if (elements.contains("element")) { 
    something
}
</code></pre>

<p>is there some function in java ?
thx for help</p>
