Record Class ExecutionContextImpl

java.lang.Object
java.lang.Record
dev.enola.common.linereader.ExecutionContextImpl
All Implemented Interfaces:
ExecutionContext

public record ExecutionContextImpl(ImmutableMap<String,String> environment, InputStream input, OutputStream output, OutputStream error, Charset inputCharset, Charset outputCharset, Charset errorCharset) extends Record implements ExecutionContext
  • Constructor Details

    • ExecutionContextImpl

      public ExecutionContextImpl(ImmutableMap<String,String> environment, InputStream input, OutputStream output, OutputStream error, Charset inputCharset, Charset outputCharset, Charset errorCharset)
      Creates an instance of a ExecutionContextImpl record class.
      Parameters:
      environment - the value for the environment record component
      input - the value for the input record component
      output - the value for the output record component
      error - the value for the error record component
      inputCharset - the value for the inputCharset record component
      outputCharset - the value for the outputCharset record component
      errorCharset - the value for the errorCharset record component
  • Method Details

    • 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.
    • environment

      Returns the value of the environment record component.
      Specified by:
      environment in interface ExecutionContext
      Returns:
      the value of the environment record component
    • input

      public InputStream input()
      Returns the value of the input record component.
      Specified by:
      input in interface ExecutionContext
      Returns:
      the value of the input record component
    • output

      public OutputStream output()
      Returns the value of the output record component.
      Specified by:
      output in interface ExecutionContext
      Returns:
      the value of the output record component
    • error

      public OutputStream error()
      Returns the value of the error record component.
      Specified by:
      error in interface ExecutionContext
      Returns:
      the value of the error record component
    • inputCharset

      Returns the value of the inputCharset record component.
      Specified by:
      inputCharset in interface ExecutionContext
      Returns:
      the value of the inputCharset record component
    • outputCharset

      Returns the value of the outputCharset record component.
      Specified by:
      outputCharset in interface ExecutionContext
      Returns:
      the value of the outputCharset record component
    • errorCharset

      Returns the value of the errorCharset record component.
      Specified by:
      errorCharset in interface ExecutionContext
      Returns:
      the value of the errorCharset record component