All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.humbleui.skija.svg.SVGLength Maven / Gradle / Ivy

// Generated by delombok at Wed Sep 14 01:50:49 UTC 2022
package io.github.humbleui.skija.svg;

import lombok.*;
import org.jetbrains.annotations.*;

public class SVGLength {
    @ApiStatus.Internal
    public final float _value;
    @ApiStatus.Internal
    public final SVGLengthUnit _unit;

    @ApiStatus.Internal
    public SVGLength(float value, int unit) {
        this(value, SVGLengthUnit._values[unit]);
    }

    public SVGLength(float value) {
        this(value, SVGLengthUnit.NUMBER);
    }

    @java.lang.SuppressWarnings("all")
    public SVGLength(final float value, final SVGLengthUnit unit) {
        this._value = value;
        this._unit = unit;
    }

    @java.lang.SuppressWarnings("all")
    public float getValue() {
        return this._value;
    }

    @java.lang.SuppressWarnings("all")
    public SVGLengthUnit getUnit() {
        return this._unit;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof SVGLength)) return false;
        final SVGLength other = (SVGLength) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (java.lang.Float.compare(this.getValue(), other.getValue()) != 0) return false;
        final java.lang.Object this$_unit = this.getUnit();
        final java.lang.Object other$_unit = other.getUnit();
        if (this$_unit == null ? other$_unit != null : !this$_unit.equals(other$_unit)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof SVGLength;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + java.lang.Float.floatToIntBits(this.getValue());
        final java.lang.Object $_unit = this.getUnit();
        result = result * PRIME + ($_unit == null ? 43 : $_unit.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public java.lang.String toString() {
        return "SVGLength(_value=" + this.getValue() + ", _unit=" + this.getUnit() + ")";
    }

    /**
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    public SVGLength withValue(final float _value) {
        return this._value == _value ? this : new SVGLength(_value, this._unit);
    }

    /**
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    public SVGLength withUnit(final SVGLengthUnit _unit) {
        return this._unit == _unit ? this : new SVGLength(this._value, _unit);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy