Record Class ConversionResult.ConversionContext

java.lang.Object
java.lang.Record
io.github.kaktushose.proteus.conversion.ConversionResult.ConversionContext
Record Components:
path - a List of Edges describing the full path of the conversion
step - the Edge at which the conversion failed
Enclosing interface:
ConversionResult<T>

public static record ConversionResult.ConversionContext(@NotNull List<Edge> path, @NotNull Edge step) extends Record
Provides additional information about the conversion that failed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConversionContext(@NotNull List<Edge> path, @NotNull Edge step)
    Creates an instance of a ConversionContext record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull Type<?>
    Gets the source Type of the path.
    final int
    Returns a hash code value for this object.
    @NotNull Type<?>
    Gets the destination Type of the path.
    @NotNull List<Edge>
    Returns the value of the path record component.
    @NotNull Edge
    Returns the value of the step record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ConversionContext

      public ConversionContext(@NotNull @NotNull List<Edge> path, @NotNull @NotNull Edge step)
      Creates an instance of a ConversionContext record class.
      Parameters:
      path - the value for the path record component
      step - the value for the step record component
  • Method Details

    • from

      @NotNull public @NotNull Type<?> from()
      Gets the source Type of the path.
      Returns:
      the source Type of the path
    • into

      @NotNull public @NotNull Type<?> into()
      Gets the destination Type of the path.
      Returns:
      the destination Type of the path
    • 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.
    • path

      @NotNull public @NotNull List<Edge> path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • step

      @NotNull public @NotNull Edge step()
      Returns the value of the step record component.
      Returns:
      the value of the step record component