abk.json
Class AJsonKeyword

java.lang.Object
  extended by abk.json.AJsonElement
      extended by abk.json.AJsonKeyword

public class AJsonKeyword
extends AJsonElement

Representación como AJsonElement de expresiones literales. Un literal es una cadena de texto que se representa sin comillas.


Field Summary
static AJsonKeyword FALSE
          Instancia AJsonKeyword correspondiente a false.
private  String iLiteral
          Valor literal de la palabra clave.
static AJsonKeyword NULL
          Instancia AJsonKeyword correspondiente a null.
static AJsonKeyword TRUE
          Instancia AJsonKeyword correspondiente a true.
 
Fields inherited from class abk.json.AJsonElement
DOT, SEP, UNDEFINED
 
Constructor Summary
private AJsonKeyword(String literal)
          Crea una instancia con el literal dado, o bien el literal "null" si se pasa null.
 
Method Summary
 void stringify(Appendable sb)
          Añade el valor del literal al Appendable que se le pasa.
static AJsonKeyword valueOf(boolean b)
          Devuelve la instancia AJsonKeyword correspondiente a un booleano.
 
Methods inherited from class abk.json.AJsonElement
byteValue, doubleValue, floatValue, getBasePath, getBoolean, getMapRef, getNumber, getString, intValue, isFalse, isMappeable, isNull, isTrue, jsonify, jsonifySimple, longValue, shortValue, stringify, stringify, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final AJsonKeyword NULL
Instancia AJsonKeyword correspondiente a null.


TRUE

public static final AJsonKeyword TRUE
Instancia AJsonKeyword correspondiente a true.


FALSE

public static final AJsonKeyword FALSE
Instancia AJsonKeyword correspondiente a false.


iLiteral

private String iLiteral
Valor literal de la palabra clave.

Constructor Detail

AJsonKeyword

private AJsonKeyword(String literal)
Crea una instancia con el literal dado, o bien el literal "null" si se pasa null.

Parameters:
literal - Valor que se representará en JSON como una cadena SIN comillas.
Method Detail

valueOf

public static final AJsonKeyword valueOf(boolean b)
Devuelve la instancia AJsonKeyword correspondiente a un booleano.

Parameters:
b - Valor booleano para recupera la palabra clave JSON.
Returns:
Instancia AJsonKeyword correspondiente al booleano b.

stringify

public void stringify(Appendable sb)
               throws IOException
Añade el valor del literal al Appendable que se le pasa.

Specified by:
stringify in class AJsonElement
Parameters:
sb - Objeto al que se añade el literal.
Throws:
IOException - si se produce un error de la capa de transporte.


Copyright © 2024. All rights reserved.