Record Class CtRange<T extends Comparable<T>>

java.lang.Object
java.lang.Record
de.firemage.autograder.core.integrated.CtRange<T>

public record CtRange<T extends Comparable<T>>(spoon.reflect.code.CtExpression<T extends Comparable<T>> ctExpression, spoon.reflect.code.BinaryOperatorKind operator, spoon.reflect.code.CtLiteral<T extends Comparable<T>> ctLiteral) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    CtRange(spoon.reflect.code.CtExpression<T> ctExpression, spoon.reflect.code.BinaryOperatorKind operator, spoon.reflect.code.CtLiteral<T> ctLiteral)
    Creates an instance of a CtRange record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    spoon.reflect.code.CtExpression<T>
    Returns the value of the ctExpression record component.
    spoon.reflect.code.CtLiteral<T>
    Returns the value of the ctLiteral record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    ofCharRange(spoon.reflect.code.CtBinaryOperator<Boolean> ctBinaryOperator)
     
    spoon.reflect.code.BinaryOperatorKind
    Returns the value of the operator record component.
    org.apache.commons.lang3.Range<T>
     
    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

    • CtRange

      public CtRange(spoon.reflect.code.CtExpression<T> ctExpression, spoon.reflect.code.BinaryOperatorKind operator, spoon.reflect.code.CtLiteral<T> ctLiteral)
      Creates an instance of a CtRange record class.
      Parameters:
      ctExpression - the value for the ctExpression record component
      operator - the value for the operator record component
      ctLiteral - the value for the ctLiteral record component
  • Method Details

    • ofCharRange

      public static Optional<CtRange<Character>> ofCharRange(spoon.reflect.code.CtBinaryOperator<Boolean> ctBinaryOperator)
    • toRange

      public org.apache.commons.lang3.Range<T> toRange()
    • 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.
    • ctExpression

      public spoon.reflect.code.CtExpression<T> ctExpression()
      Returns the value of the ctExpression record component.
      Returns:
      the value of the ctExpression record component
    • operator

      public spoon.reflect.code.BinaryOperatorKind operator()
      Returns the value of the operator record component.
      Returns:
      the value of the operator record component
    • ctLiteral

      public spoon.reflect.code.CtLiteral<T> ctLiteral()
      Returns the value of the ctLiteral record component.
      Returns:
      the value of the ctLiteral record component