title: Fast way to sort a list of enum with values
body: <p>SOLUTION FOUND!</p>
  <p>I'm trying to find a way how to implement this code.</p>
  <p>What I need to do is to find fast methods to rearrange the array, so that all cheese objects would be a part of the first part of the array and all milk objects are in the middle of the array and bread objects are at the end.</p>
  <p>Any help here?</p>
  <pre><code>public class Shop {
  
      enum shoppingList {cheese, milk, bread};
  
      public static void rearrange (shoppingList[] shopping) {
          shoppingList cheese = shoppingList.cheese;
          shoppingList milk = shoppingList.milk;
          shoppingList bread = shoppingList.bread;
  
         
      }
  }
  </code></pre>