com.github.bloodshura.ignitium.cfg.json.handling.Token Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ignitium-cfg Show documentation
Show all versions of ignitium-cfg Show documentation
A collection of configuration and serialization readers and writers, like JSON, internationalization (I18n), and CSV.
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