// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

// THIS FILE WAS AUTO-GENERATED BY ./wpiunits/generate_units.py. DO NOT MODIFY

package edu.wpi.first.units.measure;

import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;

@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
public interface Frequency extends Measure<FrequencyUnit> {
  static  Frequency ofRelativeUnits(double magnitude, FrequencyUnit unit) {
    return new ImmutableFrequency(magnitude, unit.toBaseUnits(magnitude), unit);
  }

  static  Frequency ofBaseUnits(double baseUnitMagnitude, FrequencyUnit unit) {
    return new ImmutableFrequency(unit.fromBaseUnits(baseUnitMagnitude), baseUnitMagnitude, unit);
  }

  @Override
  Frequency copy();

  @Override
  default MutFrequency mutableCopy() {
    return new MutFrequency(magnitude(), baseUnitMagnitude(), unit());
  }

  @Override
  FrequencyUnit unit();

  @Override
  default FrequencyUnit baseUnit() { return (FrequencyUnit) unit().getBaseUnit(); }

  @Override
  default double in(FrequencyUnit unit) {
    return unit.fromBaseUnits(baseUnitMagnitude());
  }

  @Override
  default Frequency unaryMinus() {
    return (Frequency) unit().ofBaseUnits(0 - baseUnitMagnitude());
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use unaryMinus() instead. This was renamed for consistency with other WPILib classes like Rotation2d
  */
  @Override
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  default Frequency negate() {
    return (Frequency) unaryMinus();
  }

  @Override
  default Frequency plus(Measure<? extends FrequencyUnit> other) {
    return (Frequency) unit().ofBaseUnits(baseUnitMagnitude() + other.baseUnitMagnitude());
  }

  @Override
  default Frequency minus(Measure<? extends FrequencyUnit> other) {
    return (Frequency) unit().ofBaseUnits(baseUnitMagnitude() - other.baseUnitMagnitude());
  }

  @Override
  default Frequency times(double multiplier) {
    return (Frequency) unit().ofBaseUnits(baseUnitMagnitude() * multiplier);
  }

  @Override
  default Frequency div(double divisor) {
    return (Frequency) unit().ofBaseUnits(baseUnitMagnitude() / divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Override
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  default Frequency divide(double divisor) {
    return (Frequency) div(divisor);
  }

  @Override
  default Velocity<FrequencyUnit> per(TimeUnit period) {
    return div(period.of(1));
  }


  @Override
  default Mult<FrequencyUnit, AccelerationUnit<?>> times(Acceleration<?> multiplier) {
    return (Mult<FrequencyUnit, AccelerationUnit<?>>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, AccelerationUnit<?>> div(Acceleration<?> divisor) {
    return (Per<FrequencyUnit, AccelerationUnit<?>>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, AccelerationUnit<?>> divide(Acceleration<?> divisor) {
    return div(divisor);
  }


  @Override
  default AngularVelocity times(Angle multiplier) {
    return RadiansPerSecond.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }

  @Override
  default Per<FrequencyUnit, AngleUnit> div(Angle divisor) {
    return (Per<FrequencyUnit, AngleUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, AngleUnit> divide(Angle divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, AngularAccelerationUnit> times(AngularAcceleration multiplier) {
    return (Mult<FrequencyUnit, AngularAccelerationUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, AngularAccelerationUnit> div(AngularAcceleration divisor) {
    return (Per<FrequencyUnit, AngularAccelerationUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, AngularAccelerationUnit> divide(AngularAcceleration divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, AngularMomentumUnit> times(AngularMomentum multiplier) {
    return (Mult<FrequencyUnit, AngularMomentumUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, AngularMomentumUnit> div(AngularMomentum divisor) {
    return (Per<FrequencyUnit, AngularMomentumUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, AngularMomentumUnit> divide(AngularMomentum divisor) {
    return div(divisor);
  }


  @Override
  default AngularAcceleration times(AngularVelocity multiplier) {
    return RadiansPerSecondPerSecond.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }

  @Override
  default Per<FrequencyUnit, AngularVelocityUnit> div(AngularVelocity divisor) {
    return (Per<FrequencyUnit, AngularVelocityUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, AngularVelocityUnit> divide(AngularVelocity divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, CurrentUnit> times(Current multiplier) {
    return (Mult<FrequencyUnit, CurrentUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, CurrentUnit> div(Current divisor) {
    return (Per<FrequencyUnit, CurrentUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, CurrentUnit> divide(Current divisor) {
    return div(divisor);
  }

  @Override
  default Frequency div(Dimensionless divisor) {
    return (Frequency) Hertz.of(baseUnitMagnitude() / divisor.baseUnitMagnitude());
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Override
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  default Frequency divide(Dimensionless divisor) {
    return (Frequency) div(divisor);
  }

  @Override
  default Frequency times(Dimensionless multiplier) {
    return (Frequency) Hertz.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }


  @Override
  default LinearVelocity times(Distance multiplier) {
    return MetersPerSecond.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }

  @Override
  default Per<FrequencyUnit, DistanceUnit> div(Distance divisor) {
    return (Per<FrequencyUnit, DistanceUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, DistanceUnit> divide(Distance divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, EnergyUnit> times(Energy multiplier) {
    return (Mult<FrequencyUnit, EnergyUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, EnergyUnit> div(Energy divisor) {
    return (Per<FrequencyUnit, EnergyUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, EnergyUnit> divide(Energy divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, ForceUnit> times(Force multiplier) {
    return (Mult<FrequencyUnit, ForceUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, ForceUnit> div(Force divisor) {
    return (Per<FrequencyUnit, ForceUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, ForceUnit> divide(Force divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, FrequencyUnit> times(Frequency multiplier) {
    return (Mult<FrequencyUnit, FrequencyUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Dimensionless div(Frequency divisor) {
    return Value.of(baseUnitMagnitude() / divisor.baseUnitMagnitude());
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Dimensionless divide(Frequency divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, LinearAccelerationUnit> times(LinearAcceleration multiplier) {
    return (Mult<FrequencyUnit, LinearAccelerationUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, LinearAccelerationUnit> div(LinearAcceleration divisor) {
    return (Per<FrequencyUnit, LinearAccelerationUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, LinearAccelerationUnit> divide(LinearAcceleration divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, LinearMomentumUnit> times(LinearMomentum multiplier) {
    return (Mult<FrequencyUnit, LinearMomentumUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, LinearMomentumUnit> div(LinearMomentum divisor) {
    return (Per<FrequencyUnit, LinearMomentumUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, LinearMomentumUnit> divide(LinearMomentum divisor) {
    return div(divisor);
  }


  @Override
  default LinearAcceleration times(LinearVelocity multiplier) {
    return MetersPerSecondPerSecond.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }

  @Override
  default Per<FrequencyUnit, LinearVelocityUnit> div(LinearVelocity divisor) {
    return (Per<FrequencyUnit, LinearVelocityUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, LinearVelocityUnit> divide(LinearVelocity divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, MassUnit> times(Mass multiplier) {
    return (Mult<FrequencyUnit, MassUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, MassUnit> div(Mass divisor) {
    return (Per<FrequencyUnit, MassUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, MassUnit> divide(Mass divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, MomentOfInertiaUnit> times(MomentOfInertia multiplier) {
    return (Mult<FrequencyUnit, MomentOfInertiaUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, MomentOfInertiaUnit> div(MomentOfInertia divisor) {
    return (Per<FrequencyUnit, MomentOfInertiaUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, MomentOfInertiaUnit> divide(MomentOfInertia divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, MultUnit<?, ?>> times(Mult<?, ?> multiplier) {
    return (Mult<FrequencyUnit, MultUnit<?, ?>>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, MultUnit<?, ?>> div(Mult<?, ?> divisor) {
    return (Per<FrequencyUnit, MultUnit<?, ?>>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, MultUnit<?, ?>> divide(Mult<?, ?> divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, PerUnit<?, ?>> times(Per<?, ?> multiplier) {
    return (Mult<FrequencyUnit, PerUnit<?, ?>>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, PerUnit<?, ?>> div(Per<?, ?> divisor) {
    return (Per<FrequencyUnit, PerUnit<?, ?>>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, PerUnit<?, ?>> divide(Per<?, ?> divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, PowerUnit> times(Power multiplier) {
    return (Mult<FrequencyUnit, PowerUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, PowerUnit> div(Power divisor) {
    return (Per<FrequencyUnit, PowerUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, PowerUnit> divide(Power divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, ResistanceUnit> times(Resistance multiplier) {
    return (Mult<FrequencyUnit, ResistanceUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, ResistanceUnit> div(Resistance divisor) {
    return (Per<FrequencyUnit, ResistanceUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, ResistanceUnit> divide(Resistance divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, TemperatureUnit> times(Temperature multiplier) {
    return (Mult<FrequencyUnit, TemperatureUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, TemperatureUnit> div(Temperature divisor) {
    return (Per<FrequencyUnit, TemperatureUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, TemperatureUnit> divide(Temperature divisor) {
    return div(divisor);
  }


  @Override
  default Dimensionless times(Time multiplier) {
    return Value.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }

  @Override
  default Velocity<FrequencyUnit> div(Time divisor) {
    return VelocityUnit.combine(unit(), divisor.unit()).ofBaseUnits(baseUnitMagnitude() / divisor.baseUnitMagnitude());
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Velocity<FrequencyUnit> divide(Time divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, TorqueUnit> times(Torque multiplier) {
    return (Mult<FrequencyUnit, TorqueUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, TorqueUnit> div(Torque divisor) {
    return (Per<FrequencyUnit, TorqueUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, TorqueUnit> divide(Torque divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, VelocityUnit<?>> times(Velocity<?> multiplier) {
    return (Mult<FrequencyUnit, VelocityUnit<?>>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, VelocityUnit<?>> div(Velocity<?> divisor) {
    return (Per<FrequencyUnit, VelocityUnit<?>>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, VelocityUnit<?>> divide(Velocity<?> divisor) {
    return div(divisor);
  }


  @Override
  default Mult<FrequencyUnit, VoltageUnit> times(Voltage multiplier) {
    return (Mult<FrequencyUnit, VoltageUnit>) Measure.super.times(multiplier);
  }

  @Override
  default Per<FrequencyUnit, VoltageUnit> div(Voltage divisor) {
    return (Per<FrequencyUnit, VoltageUnit>) Measure.super.div(divisor);
  }

  /**
  * {@inheritDoc}
  *
  * @deprecated use div instead. This was renamed for consistency with other languages like Kotlin
  */
  @Deprecated(since = "2025", forRemoval = true)
  @SuppressWarnings({"deprecation", "removal"})
  @Override
  default Per<FrequencyUnit, VoltageUnit> divide(Voltage divisor) {
    return div(divisor);
  }
/** Converts this frequency to the time period between cycles. */
default Time asPeriod() { return Seconds.of(1 / baseUnitMagnitude()); }
}
