com.github.bloodshura.ignitium.cfg.props.serial.PropertyEntry 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.props.serial;
import com.github.bloodshura.ignitium.object.Base;
import javax.annotation.Nonnull;
public class PropertyEntry extends Base {
public static final int ENFORCE_CHAR = 1;
public static final int ENFORCE_NONE = 0;
public static final int ENFORCE_STRING = 2;
public final int enforce;
public final Object object;
public final Type type;
public PropertyEntry(@Nonnull Type type, @Nonnull Object object, boolean hadQuotes, boolean simpleQuote) {
this(type, object, hadQuotes ? (simpleQuote ? ENFORCE_CHAR : ENFORCE_STRING) : ENFORCE_NONE);
}
public PropertyEntry(@Nonnull Type type, @Nonnull Object object, int enforce) {
this.enforce = enforce;
this.object = object;
this.type = type;
}
@Nonnull
@Override
protected Object[] stringValues() {
return new Object[] { type, enforce, object };
}
public static enum Type {
KEY_DEF,
VALUE_DEF
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy