title: Using MultiDimensional (2D) arrays as enums for Kernel convolution matrices
body: <p>I'm making a very basic Image Processing program in Java and I have a few pre-defined 3x3 matrices for various convolutions (sharpens, blurs, edge detections etc) I have them hard coded for now for testing purposes but am trying to put them in a more appropriate format like enum but I'm not sure how to use 2D arrays as enums. When I try to access the kernels indices I just get a warning that the expected type is array but resolved to kernel.</p>
  <pre><code>    
      IDENTITY(new  double[][] {
              {0, 0, 0},
              {0, 1, 0},
              {0, 0, 0}
      }),
  
      EDGE_DETECTION_1(new double[][]  {
              {-1, -1, -1},
              {-1, 8, -1},
              {-1, -1, -1}
      }),
      
      
      EDGE_DETECTION_2(new double[][] {
              {1, 0, -1},
              {0, 0, 0},
              {-1, 0, 1}
      }),
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ciNME.png" rel="nofollow noreferrer">Kernel array</a></p>
  <p>I'm a little new to using enums more complicated than basic Strings etc so I could be missing very obvious things but I would appreciate any pointers.</p>