Here is the code snippet:
File: DirProc.java
-----------------------
public class DirProc
{
public enum DIRECTION { X, Y};
// Other methods and variables as well
}
File: Test.java
--------------------
import static DirProc.DIRECTION;
public class
Test {
private Map< DIRECTION,
String > myDirMap = new EnumMap< DIRECTION , String> ( DIRECTION.class );
// COMPILER ERROR HERE }
-----> Compiler error: "Test.java": type parameter DirProc.DIRECTION is not within its bound at line 77, column 88
The compiler complains even though the key is of type DIRECTION which is an
enum, and is visible in Test.java (other methods make use of DIRECTION
without errors)
I'm out of ideas. Any help will be appreciated. Thanks a lot.
[ April 15, 2005: Message edited by: Johnny Smith ]