How to define F<T> and F<T,U> and F<T,U,V> interfaces in Java?
<p>How would I define <code>F&lt;T&gt;</code> and <code>F&lt;T,U&gt;</code> and <code>F&lt;T,U,V&gt;</code> interfaces in Java (in lieu of <code>Action</code> from C#, they would have functions with one, two and three parameters returning void inside)?</p>

<p>When I try to create them as nested types, I get an error saying "Duplicate nested type F",  when I try to create them as top-level types, I would have to place both <code>F&lt;T&gt;</code> and <code>F&lt;T,U&gt;</code> in F.java.</p>

<p>I might be able to solve this by placing each F in separate package, but I don't like that solution as I'd have to define as many packages as many generic parameters I would have. </p>

<p>The same would go for implementing a Tuple class with multiple generic parameters, etc.</p>

<p>code sample, not working:</p>

<pre><code>public interface F&lt;T&gt;{
    public void f(T arg1);
}

public interface F&lt;T,U&gt;{
    public void f(T arg1,U arg2);
}
</code></pre>
