Record Class SvgStop

java.lang.Object
java.lang.Record
org.jhotdraw8.svg.figure.SvgStop

public record SvgStop(double offset, org.jhotdraw8.svg.css.SvgDefaultablePaint<CssColor> color, org.jhotdraw8.css.value.CssDefaultableValue<org.jhotdraw8.css.value.CssSize> opacity) extends Record
CssStop.
Author:
Werner Randelshofer
  • Constructor Summary

    Constructors
    Constructor
    Description
    SvgStop(double offset, org.jhotdraw8.svg.css.SvgDefaultablePaint<CssColor> color, org.jhotdraw8.css.value.CssDefaultableValue<org.jhotdraw8.css.value.CssSize> opacity)
    Creates an instance of a SvgStop record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jhotdraw8.svg.css.SvgDefaultablePaint<CssColor>
    Returns the value of the color record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    double
    Returns the value of the offset record component.
    org.jhotdraw8.css.value.CssDefaultableValue<org.jhotdraw8.css.value.CssSize>
    Returns the value of the opacity record component.
    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

    • SvgStop

      public SvgStop(double offset, org.jhotdraw8.svg.css.SvgDefaultablePaint<CssColor> color, org.jhotdraw8.css.value.CssDefaultableValue<org.jhotdraw8.css.value.CssSize> opacity)
      Creates an instance of a SvgStop record class.
      Parameters:
      offset - the value for the offset record component
      color - the value for the color record component
      opacity - the value for the opacity record component
  • Method Details

    • hashCode

      public 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 boolean equals(@Nullable Object obj)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • toString

      public @NonNull 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
    • offset

      public double offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • color

      public org.jhotdraw8.svg.css.SvgDefaultablePaint<CssColor> color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • opacity

      public org.jhotdraw8.css.value.CssDefaultableValue<org.jhotdraw8.css.value.CssSize> opacity()
      Returns the value of the opacity record component.
      Returns:
      the value of the opacity record component