Abstracting an id attribute in C# or Java
<p>I am designing an API. Here are some example methods from an interface:</p>

<pre><code>Entry findEntry(int processId);
Entry findEntry(int processId, Filter filter);
</code></pre>

<p>where <code>processId</code> refers to some unique identifying information. However I don't really know what the type of <code>processId</code> is yet.</p>

<p>How can I abstract away an element like <code>id</code> of something? </p>

<p>The best I could come up with is creating a dummy interface:</p>

<pre><code>Entry findEntry(ProcessId id);
Entry findEntry(ProcessId, Filter filter);
</code></pre>

<p>However, I worry that with the above approach I may force the client of the API to operate on too high an abstraction level. For example, the equality of process id's will no longer work (whereas if they used int's - it would).</p>

<p><em>Clarification</em>: I failed to clarify that I am writing only the interfaces (contracts), to be implemented later, possibly by a different team. That is why I cannot enforce certain things like equals method.</p>
