Tabnine Logo
ShindigTypeConverter.coerceToBoolean
Code IndexAdd Tabnine to your IDE (free)

How to use
coerceToBoolean
method
in
org.apache.shindig.expressions.ShindigTypeConverter

Best Java code snippets using org.apache.shindig.expressions.ShindigTypeConverter.coerceToBoolean (Showing top 5 results out of 315)

origin: apache/shindig

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 //  Nothing more we can do.
 return null;
}
origin: org.gatein.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 
 //  Nothing more we can do.
 return null;
}
origin: com.lmco.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 
 //  Nothing more we can do.
 return null;
}
origin: org.apache.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 //  Nothing more we can do.
 return null;
}
origin: org.wso2.org.apache.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 //  Nothing more we can do.
 return null;
}
org.apache.shindig.expressionsShindigTypeConvertercoerceToBoolean

Javadoc

Coerce the following booleans: null -> false empty string, and "false" -> false boolean false -> false number 0 -> false All else is true.

Popular methods of ShindigTypeConverter

  • coerceToIterable
    Coerce objects to iterables. Iterables and JSONArrays have the obvious coercion. JSONObjects are coe
  • coerceToJsonArray
  • convert

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • startActivity (Activity)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now