title: Java: Enum parameter in method
body: <p>I have a method lets say:</p>
  
  <pre><code>private static String drawCellValue(
      int maxCellLength, String cellValue, String align) { }
  </code></pre>
  
  <p>and as you can notice, I have a parameter called align. Inside this method I'm going to have some if condition on whether the value is a 'left' or 'right'.. setting the parameter as String, obviously I can pass any string value.. I would like to know if it's possible to have an Enum value as a method parameter, and if so, how?</p>
  
  <p>Just in case someone thinks about this; I thought about using a Boolean value but I don't really fancy it. First, how to associate true/false with left/right ? (Ok, I can use comments but I still find it dirty) and secondly, I might decide to add a new value, like 'justify', so if I have more than 2 possible values, Boolean type is definitely not possible to use.</p>
  
  <p>Any ideas?</p>