com.github.jknack.handlebars
Class Handlebars.Utils

java.lang.Object
  extended by com.github.jknack.handlebars.Handlebars.Utils
Enclosing class:
Handlebars

public static class Handlebars.Utils
extends Object

Utilities function like: escapeExpression(CharSequence) and isEmpty(Object).

Since:
0.1.0
Author:
edgar.espina

Constructor Summary
Handlebars.Utils()
           
 
Method Summary
static String escapeExpression(CharSequence input)
           Escapes the characters in a String using HTML entities.
static boolean isEmpty(Object value)
          Evaluate the given object and return true is the object is considered empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handlebars.Utils

public Handlebars.Utils()
Method Detail

isEmpty

public static boolean isEmpty(Object value)
Evaluate the given object and return true is the object is considered empty. Nulls, empty list or array and false values are considered empty.

Parameters:
value - The object value.
Returns:
Return true is the object is considered empty. Nulls, empty list or array and false values are considered empty.

escapeExpression

public static String escapeExpression(CharSequence input)

Escapes the characters in a String using HTML entities.

For example:

"bread" & "butter"

becomes:
  "bread" & "butter"
 

Parameters:
input - the String to escape, may be null.
Returns:
The escaped version of the input or the same input if it's a SafeString.


Copyright © 2012. All Rights Reserved.