Package io.github.arthurhoch.kissconfig
Record Class LoadedConfigSource
java.lang.Object
java.lang.Record
io.github.arthurhoch.kissconfig.LoadedConfigSource
- Record Components:
name- source nametype- source typepath- source path when availableloaded- whether the source was loadedoptional- whether the source was optionalexplicit- whether the source was explicitly configured by the uservalueCount- number of values loaded from the sourcemessage- diagnostic message
public record LoadedConfigSource(String name, ConfigLocationType type, Path path, boolean loaded, boolean optional, boolean explicit, int valueCount, String message)
extends Record
Describes an attempted configuration source and whether it was loaded or skipped.
-
Constructor Summary
ConstructorsConstructorDescriptionLoadedConfigSource(String name, ConfigLocationType type, Path path, boolean loaded, boolean optional, boolean explicit, int valueCount, String message) Creates source metadata. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanexplicit()Returns the value of theexplicitrecord component.final inthashCode()Returns a hash code value for this object.booleanloaded()Returns the value of theloadedrecord component.message()Returns the value of themessagerecord component.name()Returns the value of thenamerecord component.booleanoptional()Returns the value of theoptionalrecord component.Returns the optional source path.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.intReturns the value of thevalueCountrecord component.
-
Constructor Details
-
LoadedConfigSource
public LoadedConfigSource(String name, ConfigLocationType type, Path path, boolean loaded, boolean optional, boolean explicit, int valueCount, String message) Creates source metadata.
-
-
Method Details
-
optionalPath
Returns the optional source path.- Returns:
- optional path
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
loaded
public boolean loaded()Returns the value of theloadedrecord component.- Returns:
- the value of the
loadedrecord component
-
optional
public boolean optional()Returns the value of theoptionalrecord component.- Returns:
- the value of the
optionalrecord component
-
explicit
public boolean explicit()Returns the value of theexplicitrecord component.- Returns:
- the value of the
explicitrecord component
-
valueCount
public int valueCount()Returns the value of thevalueCountrecord component.- Returns:
- the value of the
valueCountrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-