<p>How could i implement Type-Safe Enumerations in Delphi in a COM scenario ? Basically, i'd like to replace a set of primitive constants of a enumeration with a set of static final object references encapsulated in a class ? . 
In Java, we can do something like:</p>

<pre><code>public final class Enum
{
    public static final Enum ENUMITEM1 = new Enum ();
    public static final Enum ENUMITEM2 = new Enum ();
    //...
    private Enum () {}
} 
</code></pre>

<p>and make comparisons using the customized enumeration type:</p>

<pre><code>if (anObject != Enum.ENUMITEM1) ...
</code></pre>

<p>I am currently using the old Delphi 5 and i would like to declare some enums parameters on the interfaces, not allowing that client objects to pass integers (or long) types in the place of the required enumeration type. 
Do you have a better way of implementing enums other than using the native delphi enums  ? </p>

What is wrong with native Delphi enums? They are type safe.
```
```
type
  TMyEnum = (Item1, Item2, Item3);

if MyEnum <> Item1 then...
```
```
Since Delphi 2005 you can have consts in a class, but Delphi 5 can not.
```
```
type
  TMyEnum = sealed class
  public
    const Item1 = 0;
    const Item2 = 1;
    const Item3 = 2;
  end;
```
```