Enum StreamOptions.LoadingStyle
- java.lang.Object
-
- java.lang.Enum<StreamOptions.LoadingStyle>
-
- org.spongepowered.api.world.volume.stream.StreamOptions.LoadingStyle
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<StreamOptions.LoadingStyle>
- Enclosing interface:
- StreamOptions
public static enum StreamOptions.LoadingStyle extends java.lang.Enum<StreamOptions.LoadingStyle>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FORCED_GENERATED
Forces the loading of the entire area to calculate the exact available sections to fetch the predefined stream of elements to populate theVolumeStream
.FORCED_UNGENERATED
Forces the loading of the entire area to calculate the exact available sections to fetch the predefined stream of elements to populate theVolumeStream
.LAZILY_GENERATED
Ensures that sections within the area are loaded during stream execution, but unlikeFORCED_GENERATED
, sections will only be loaded duringVolumeStream
execution if and when the section is iterated over, and not pre-loaded beforehand.LAZILY_UNGENERATED
Ensures that sections within the area are loaded during stream execution, but unlikeFORCED_GENERATED
, sections will only be loaded duringVolumeStream
execution if and when the section is iterated over, and not pre-loaded beforehand.NONE
Only requests the available sections of theVolume
without incurring any loading of sections costs, useful for building streams of available elements.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
generateArea()
Whether areas are to be requested to be generated prior to streaming over them, somewhat in tandem withStreamOptions.LoadingStyle
, a section can potentially be un-generated and having never been visited before, may be requested to be generated in order for the stream's element type to be operated on.abstract boolean
immediateLoading()
static StreamOptions.LoadingStyle
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static StreamOptions.LoadingStyle[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FORCED_GENERATED
public static final StreamOptions.LoadingStyle FORCED_GENERATED
Forces the loading of the entire area to calculate the exact available sections to fetch the predefined stream of elements to populate theVolumeStream
. This will incur an initial cost ofWorld.loadChunk(Vector3i, boolean)
withshouldGenerate =
generateArea()
.
-
FORCED_UNGENERATED
public static final StreamOptions.LoadingStyle FORCED_UNGENERATED
Forces the loading of the entire area to calculate the exact available sections to fetch the predefined stream of elements to populate theVolumeStream
. This will incur an initial cost ofWorld.loadChunk(Vector3i, boolean)
withshouldGenerate =
generateArea()
.
-
LAZILY_UNGENERATED
public static final StreamOptions.LoadingStyle LAZILY_UNGENERATED
Ensures that sections within the area are loaded during stream execution, but unlikeFORCED_GENERATED
, sections will only be loaded duringVolumeStream
execution if and when the section is iterated over, and not pre-loaded beforehand.In the case of a
World
, this will still issue a request for aWorld.loadChunk(int, int, int, boolean)
withshouldGenerate =
generateArea()
.
-
LAZILY_GENERATED
public static final StreamOptions.LoadingStyle LAZILY_GENERATED
Ensures that sections within the area are loaded during stream execution, but unlikeFORCED_GENERATED
, sections will only be loaded duringVolumeStream
execution if and when the section is iterated over, and not pre-loaded beforehand.In the case of a
World
, this will still issue a request for aWorld.loadChunk(int, int, int, boolean)
withshouldGenerate =
generateArea()
.
-
NONE
public static final StreamOptions.LoadingStyle NONE
Only requests the available sections of theVolume
without incurring any loading of sections costs, useful for building streams of available elements.
-
-
Method Detail
-
values
public static StreamOptions.LoadingStyle[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StreamOptions.LoadingStyle c : StreamOptions.LoadingStyle.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StreamOptions.LoadingStyle valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
generateArea
public abstract boolean generateArea()
Whether areas are to be requested to be generated prior to streaming over them, somewhat in tandem withStreamOptions.LoadingStyle
, a section can potentially be un-generated and having never been visited before, may be requested to be generated in order for the stream's element type to be operated on. This should incur an additional cost of the stream setup, based on theStreamOptions.LoadingStyle
's request such asFORCED_GENERATED
, orLAZILY_GENERATED
.- Returns:
- Whether sections that are previously empty, should be generated
-
immediateLoading
public abstract boolean immediateLoading()
-
-