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

com.launchdarkly.sdk.LDValueNull Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package com.launchdarkly.sdk;

import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonWriter;

import java.io.IOException;

@JsonAdapter(LDValueTypeAdapter.class)
final class LDValueNull extends LDValue {
  static final LDValueNull INSTANCE = new LDValueNull();
  
  public LDValueType getType() {
    return LDValueType.NULL;
  }
  
  public boolean isNull() {
    return true;
  }

  @Override
  public String toJsonString() {
    return "null";
  }
  
  @Override
  void write(JsonWriter writer) throws IOException {
    writer.nullValue();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy