com.github.gpluscb.ggjava.entity.object.response.scalars.ScalarResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gg-java Show documentation
Show all versions of gg-java Show documentation
Java wrapper for the smash.gg GraphQL API
The newest version!
package com.github.gpluscb.ggjava.entity.object.response.scalars;
import com.github.gpluscb.ggjava.entity.EntityType;
import com.github.gpluscb.ggjava.entity.object.response.AbstractGGResponseObject;
import com.github.gpluscb.ggjava.internal.utils.Checks;
import javax.annotation.Nonnull;
public abstract class ScalarResponse extends AbstractGGResponseObject {
private final T value;
public ScalarResponse(@Nonnull EntityType type, @Nonnull T value) {
super(type, true);
Checks.nonNull(value, "value");
this.value = value;
}
public ScalarResponse(@Nonnull EntityType type) {
super(type);
value = null;
}
/**
* @throws IllegalStateException if this is not provided
*/
@Nonnull
public T getValue() {
checkProvided();
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy