title: Accessing Java ThreadLocal object from a class other than where it was declared
body: <p>I'm declaring a ThreadLocal object and setting a value like below.</p>
  
  <pre><code>Public Class Blah {
  
  private ThreadLocal&lt;Set&lt;Integer&gt;&gt; numberThreaLocalObj= new ThreadLocal&lt;&gt;();
  
    void setValue() {
      Set&lt;Integer&gt; numberSet = new HashSet&lt;&gt;();
      numberSet .add(1);
      threaLocalObj.set(numberSet) 
    }
  } 
  </code></pre>
  
  <p>Is there anyway to reference this <em>numberThreaLocalObj</em> variable outside of this class within the same thread?</p>
  
  <p>I've found some code the seems to clear ALL the threadlocals, but I just need to clear this particular Threadlocal variable based on a condition.</p>
  
  <p>Unfortunately this is a inherited technical design.</p>
  
  <p>EDIT - SOLUTION FOUND as outlined in my answer.</p>