Record Class Atmosphere
java.lang.Object
java.lang.Record
com.lightning.northstar.planet.data.Atmosphere
- Record Components:
composition- the atmosphere compositionpressure- the atmosphere pressure in Pascals (Pa)daytimeStarBrightness- the minimum brightness of stars during the day
public record Atmosphere(List<AtmosphereFluid> composition, float pressure, float daytimeStarBrightness)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Atmosphere> static final net.neoforged.neoforge.common.util.Lazy<Atmosphere> -
Constructor Summary
ConstructorsConstructorDescriptionAtmosphere(List<AtmosphereFluid> composition, float pressure, float daytimeStarBrightness) Creates an instance of aAtmosphererecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Atmosphere.Builderbuilder()Returns the value of thecompositionrecord component.floatReturns the value of thedaytimeStarBrightnessrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisVacuum()floatpressure()Returns the value of thepressurerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
DEFAULT
-
-
Constructor Details
-
Atmosphere
Creates an instance of aAtmosphererecord class.- Parameters:
composition- the value for thecompositionrecord componentpressure- the value for thepressurerecord componentdaytimeStarBrightness- the value for thedaytimeStarBrightnessrecord component
-
-
Method Details
-
isVacuum
public boolean isVacuum() -
builder
-
asBuilder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
composition
Returns the value of thecompositionrecord component.- Returns:
- the value of the
compositionrecord component
-
pressure
public float pressure()Returns the value of thepressurerecord component.- Returns:
- the value of the
pressurerecord component
-
daytimeStarBrightness
public float daytimeStarBrightness()Returns the value of thedaytimeStarBrightnessrecord component.- Returns:
- the value of the
daytimeStarBrightnessrecord component
-