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

com.github.bloodshura.ignitium.cfg.json.handling.Token Maven / Gradle / Ivy

Go to download

A collection of configuration and serialization readers and writers, like JSON, internationalization (I18n), and CSV.

There is a newer version: 1.0.1
Show newest version
package com.github.bloodshura.ignitium.cfg.json.handling;

import com.github.bloodshura.ignitium.object.Base;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class Token extends Base {
	private final Type type;
	private final Object value;

	public Token(@Nonnull Type type, @Nullable Object value) {
		this.type = type;
		this.value = value;
	}

	@Nonnull
	public Type getType() {
		return type;
	}

	@Nullable
	public Object getValue() {
		return value;
	}

	@Nonnull
	@Override
	protected Object[] stringValues() {
		return new Object[] { getType(), getValue() };
	}

	public static enum Type {
		COLON,
		COMMA,
		END_OF_FILE,
		LEFT_BRACE,
		LEFT_SQUARE,
		RIGHT_BRACE,
		RIGHT_SQUARE,
		VALUE
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy