congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JsonNumber.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.hjson.JsonNumber
constructor

Best Java code snippets using org.hjson.JsonNumber.<init> (Showing top 16 results out of 315)

origin: org.hjson/hjson

/**
 * Returns a JsonValue instance that represents the given <code>long</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(long value) {
 return new JsonNumber(value);
}
origin: hjson/hjson-java

/**
 * Returns a JsonValue instance that represents the given <code>long</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(long value) {
 return new JsonNumber(value);
}
origin: org.hjson/hjson

/**
 * Returns a JsonValue instance that represents the given <code>int</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(int value) {
 return new JsonNumber(value);
}
origin: org.hjson/hjson

/**
 * Returns a JsonValue instance that represents the given <code>double</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(double value) {
 return new JsonNumber(value);
}
origin: org.hjson/hjson

/**
 * Returns a JsonValue instance that represents the given <code>float</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(float value) {
 return new JsonNumber(value);
}
origin: hjson/hjson-java

/**
 * Returns a JsonValue instance that represents the given <code>float</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(float value) {
 return new JsonNumber(value);
}
origin: hjson/hjson-java

/**
 * Returns a JsonValue instance that represents the given <code>double</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(double value) {
 return new JsonNumber(value);
}
origin: hjson/hjson-java

/**
 * Returns a JsonValue instance that represents the given <code>int</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(int value) {
 return new JsonNumber(value);
}
origin: org.hjson/hjson

public JsonValue parse(String text)
{
 switch (text)
 {
  case "+inf":
  case "inf":
  case "+Inf":
  case "Inf":
   return new JsonNumber(Double.POSITIVE_INFINITY);
  case "-inf":
  case "-Inf":
   return new JsonNumber(Double.NEGATIVE_INFINITY);
  case "nan":
  case "NaN":
   return new JsonNumber(Double.NaN);
  default:
   return null;
 }
}
origin: hjson/hjson-java

public JsonValue parse(String text)
{
 switch (text)
 {
  case "+inf":
  case "inf":
  case "+Inf":
  case "Inf":
   return new JsonNumber(Double.POSITIVE_INFINITY);
  case "-inf":
  case "-Inf":
   return new JsonNumber(Double.NEGATIVE_INFINITY);
  case "nan":
  case "NaN":
   return new JsonNumber(Double.NaN);
  default:
   return null;
 }
}
origin: org.hjson/hjson

public JsonValue parse(String text)
{
 if (isHex.matcher(text).find())
  return new JsonNumber(Long.parseLong(text.substring(2), 16));
 else
  return null;
}
origin: hjson/hjson-java

public JsonValue parse(String text)
{
 if (isHex.matcher(text).find())
  return new JsonNumber(Long.parseLong(text.substring(2), 16));
 else
  return null;
}
origin: org.hjson/hjson

return new JsonNumber(Double.parseDouble(value.substring(0, last)));
origin: hjson/hjson-java

return new JsonNumber(Double.parseDouble(value.substring(0, last)));
origin: org.hjson/hjson

private JsonValue readNumber() throws IOException {
 startCapture();
 readIf('-');
 int firstDigit=current;
 if (!readDigit()) {
  throw expected("digit");
 }
 if (firstDigit!='0') {
  while (readDigit()) {
  }
 }
 readFraction();
 readExponent();
 return new JsonNumber(Double.parseDouble(endCapture()));
}
origin: hjson/hjson-java

private JsonValue readNumber() throws IOException {
 startCapture();
 readIf('-');
 int firstDigit=current;
 if (!readDigit()) {
  throw expected("digit");
 }
 if (firstDigit!='0') {
  while (readDigit()) {
  }
 }
 readFraction();
 readExponent();
 return new JsonNumber(Double.parseDouble(endCapture()));
}
org.hjsonJsonNumber<init>

Popular methods of JsonNumber

    Popular in Java

    • Reading from database using SQL prepared statement
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • onRequestPermissionsResult (Fragment)
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • Runnable (java.lang)
      Represents a command that can be executed. Often used to run code in a different Thread.
    • CountDownLatch (java.util.concurrent)
      A synchronization aid that allows one or more threads to wait until a set of operations being perfor
    • Collectors (java.util.stream)
    • Notification (javax.management)
    • BasicDataSource (org.apache.commons.dbcp)
      Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
    • SAXParseException (org.xml.sax)
      Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
    • Best plugins for Eclipse
    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