Tabnine Logo
JsonELResolver.toInt
Code IndexAdd Tabnine to your IDE (free)

How to use
toInt
method
in
org.apache.shindig.expressions.JsonELResolver

Best Java code snippets using org.apache.shindig.expressions.JsonELResolver.toInt (Showing top 10 results out of 315)

origin: org.gatein.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 
 return null;
}
origin: org.wso2.org.apache.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 return null;
}
origin: org.apache.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 return null;
}
origin: com.lmco.shindig/shindig-common

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 
 return null;
}
origin: apache/shindig

@Override
public Object getValue(ELContext context, Object base, Object property) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  return ((JSONObject) base).opt(String.valueOf(property));
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  return ((JSONArray) base).opt(index);
 }
 return null;
}
origin: org.apache.shindig/shindig-common

@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  try {
   ((JSONObject) base).put(String.valueOf(property), value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  try {
   ((JSONArray) base).put(index, value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  try {
   ((JSONObject) base).put(String.valueOf(property), value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  try {
   ((JSONArray) base).put(index, value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
}
origin: org.gatein.shindig/shindig-common

@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  try {
   ((JSONObject) base).put(String.valueOf(property), value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  try {
   ((JSONArray) base).put(index, value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
}
origin: com.lmco.shindig/shindig-common

@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  try {
   ((JSONObject) base).put(String.valueOf(property), value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  try {
   ((JSONArray) base).put(index, value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
}
origin: apache/shindig

@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
 if (base instanceof JSONObject) {
  context.setPropertyResolved(true);
  try {
   ((JSONObject) base).put(String.valueOf(property), value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
 if (base instanceof JSONArray) {
  context.setPropertyResolved(true);
  int index = toInt(property);
  try {
   ((JSONArray) base).put(index, value);
  } catch (JSONException e) {
   throw new ELException(e);
  }
  context.setPropertyResolved(true);
 }
}
org.apache.shindig.expressionsJsonELResolvertoInt

Popular methods of JsonELResolver

  • <init>
  • getValue
  • isJson

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • findViewById (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 12 Jupyter Notebook extensions
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