title: Comparing 2 strings with Handlebars in Java
body: <p>I am using Handlebars with Dropwizard in Java. I'd like to compare 2 strings and if the are identically, I'd like to do something. I know there are some Helpers within Javascript, but I don't get how to adapt them to java.</p>
  
  <p>I've this code, but question is, how can I add the second value to check whether they are equal.</p>
  
  <pre><code>public enum StringHelper implements Helper&lt;Object&gt; {
       eq {
           @Override
           public Boolean safeApply(final Object value, final Options options) {
             return ((String)value).equals(/*SECOND VALUE*/);
           }
         };
  
         @Override
         public Boolean apply(Object context, Options options) throws IOException {
           return safeApply(context, options);
         }
  
         protected abstract Boolean safeApply(final Object value,
                                          final Options options);
       }
  }
  </code></pre>