All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tnakamot.jscdg.json.value.JSONValueNull Maven / Gradle / Ivy

There is a newer version: 0.2.1
Show newest version
/*
 *  Copyright (C) 2020 Takashi Nakamoto .
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 3 as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see .
 */

package com.github.tnakamot.jscdg.json.value;

import com.github.tnakamot.jscdg.json.token.JSONToken;

/**
 * Represents one JSON 'null' value.
 *
 * 

* Instances of this class are immutable. */ public class JSONValueNull extends JSONValuePrimitive { public static final JSONValueNull NULL = new JSONValueNull(); /** * Create an instance of a Java representation of a JSON null value. */ private JSONValueNull() { this(null); } /** * Create an instance of a Java representation of a JSON null value * with source JSON text information. * * @param token source of this JSON null value. Can be null if this JSON * null value is not originated from an exiting JSON text. */ public JSONValueNull(JSONToken token) { super(JSONValueType.NULL, token); } @Override public int hashCode() { return "null".hashCode(); } @Override public boolean equals(Object obj) { return obj instanceof JSONValueNull; } @Override public String toString() { return "null"; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy