Record Class Source
java.lang.Object
java.lang.Record
org.apache.camel.dsl.jbang.core.common.Source
public record Source(SourceScheme scheme, String name, String content, String extension, boolean compressed)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSource(SourceScheme scheme, String name, String content, String extension, boolean compressed) Creates an instance of aSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecompressedrecord component.content()Provides source constant and automatically handles compression of content when enabled.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionrecord component.final inthashCode()Returns a hash code value for this object.booleanisXml()booleanisYaml()language()name()Returns the value of thenamerecord component.scheme()Returns the value of theschemerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Source
public Source(SourceScheme scheme, String name, String content, String extension, boolean compressed) Creates an instance of aSourcerecord class.- Parameters:
scheme- the value for theschemerecord componentname- the value for thenamerecord componentcontent- the value for thecontentrecord componentextension- the value for theextensionrecord componentcompressed- the value for thecompressedrecord component
-
-
Method Details
-
content
Provides source constant and automatically handles compression of content when enabled.- Returns:
- the content, maybe compressed.
-
language
-
isYaml
public boolean isYaml() -
isXml
public boolean isXml() -
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 '=='. -
scheme
Returns the value of theschemerecord component.- Returns:
- the value of the
schemerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
extension
Returns the value of theextensionrecord component.- Returns:
- the value of the
extensionrecord component
-
compressed
public boolean compressed()Returns the value of thecompressedrecord component.- Returns:
- the value of the
compressedrecord component
-