Record Class ConfigMapEntry

java.lang.Object
java.lang.Record
org.apache.juneau.config.internal.ConfigMapEntry
Record Components:
rawLine - The raw line this entry was parsed from, or null if the entry was created programmatically.
key - The name of this entry.
value - The raw value of this entry.
comment - The same-line comment of this entry, or null if it has no comment.
modifiers - The modifiers for this entry, or null if it has no modifiers.
preLines - The pre-lines of this entry as an unmodifiable list.

public record ConfigMapEntry(String rawLine, String key, String value, String comment, String modifiers, List<String> preLines) extends Record
Represents a single entry in a configuration. This is a read-only object.
  • Constructor Details

  • Method Details

    • getComment

      public String getComment()
      Returns the same-line comment of this entry.
      Returns:
      The same-line comment of this entry, or null if it has no comment.
    • getKey

      public String getKey()
      Returns the name of this entry.
      Returns:
      The name of this entry.
    • getModifiers

      public String getModifiers()
      Returns the modifiers for this entry.
      Returns:
      The modifiers for this entry, or null if it has no modifiers.
    • getPreLines

      public List<String> getPreLines()
      Returns the pre-lines of this entry.
      Returns:
      The pre-lines of this entry as an unmodifiable list.
    • getValue

      public String getValue()
      Returns the raw value of this entry.
      Returns:
      The raw value of this entry.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rawLine

      public String rawLine()
      Returns the value of the rawLine record component.
      Returns:
      the value of the rawLine record component
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • value

      public String value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • comment

      public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component
    • modifiers

      public String modifiers()
      Returns the value of the modifiers record component.
      Returns:
      the value of the modifiers record component
    • preLines

      public List<String> preLines()
      Returns the value of the preLines record component.
      Returns:
      the value of the preLines record component