
org.gnode.nix.internal.OptionalUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nix-linux-x86_64 Show documentation
Show all versions of nix-linux-x86_64 Show documentation
Java bindings for NIX library
The newest version!
package org.gnode.nix.internal;
import org.bytedeco.javacpp.Loader;
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.*;
/**
* OptionalUtils
* Low level wrapper to Boost optionals.
*/
@Properties(value = {
@Platform(include = {""}),
@Platform(value = "linux"),
@Platform(value = "windows")})
public class OptionalUtils {
static {
Loader.load();
}
//--------------------------------------------------
// Optional Double
//--------------------------------------------------
/**
* OptionalDouble
* Low level boost::optional<double> wrapper
*/
@Name("boost::optional")
public static class OptionalDouble extends Pointer {
static {
Loader.load();
}
/**
* Get double from the optional. Use this only after calling {@link OptionalDouble#isPresent()}.
*
* @return double data
*/
public native
@Name("get")
double getDouble();
/**
* To check if the data is present.
*
* @return True if data is available, False otherwise.
*/
public native
@Name("is_initialized")
@Cast("bool")
boolean isPresent();
}
//--------------------------------------------------
// Optional String
//--------------------------------------------------
/**
* OptionalString
* Low level boost::optional<string> wrapper
*/
@Name("boost::optional")
public static class OptionalString extends Pointer {
static {
Loader.load();
}
/**
* Get string from the optional. Use this only after calling {@link OptionalString#isPresent()}.
*
* @return return string
*/
public native
@Name("get")
@StdString
String getString();
/**
* To check if the data is present.
*
* @return True if data is available, False otherwise.
*/
public native
@Name("is_initialized")
@Cast("bool")
boolean isPresent();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy