title: How do I filter out a list of enums based on some criteria?
body: <p>Say I have a class:</p>
  
  <pre><code>public enum Enums
  {
      // about thousand different Enums 
  }
  </code></pre>
  
  <p>and I have another class where a user signs in, and based on whether or not hes an admin or a regular user, the user has access to a limited list of enums. I know I can get the full list of all the enums from the class, but what is an elegant way to filter these by some criteria, without the Enums class knowing about user information?</p>
  
  <p>Edit:
  Here is a snip of what it looks like today:</p>
  
  <pre><code>@GET
  @RolesAllowed({ADMIN})
  @Path("/test")
  public Response reply(@Auth User user)
  {
      JSONObject jsonObject = new JSONObject();
      jsonObject.put("enums", Arrays.toString(Enums.values()));
      return Response.ok(jsonObject.toJSONString()).build();
  }
  </code></pre>
  
  <p>I am returning the full list of 1000+ events, when admin should only see a limited amount.</p>