Class ChargingSchedulePeriodInfo

java.lang.Object
net.solarnetwork.ocpp.domain.ChargingSchedulePeriodInfo
All Implemented Interfaces:
net.solarnetwork.domain.Differentiable<ChargingSchedulePeriodInfo>

public class ChargingSchedulePeriodInfo extends Object implements net.solarnetwork.domain.Differentiable<ChargingSchedulePeriodInfo>
Information about a charging schedule period.
Version:
1.0
Author:
matt
  • Constructor Details

    • ChargingSchedulePeriodInfo

      public ChargingSchedulePeriodInfo()
      Default constructor.

      This rate limit is set to zero.

    • ChargingSchedulePeriodInfo

      public ChargingSchedulePeriodInfo(Duration startOffset, BigDecimal rateLimit)
      Constructor.
      Parameters:
      startOffset - the start offset from the start of the schedule
      rateLimit - the rate limit
      Throws:
      IllegalArgumentException - if startOffset or rateLimit are null
    • ChargingSchedulePeriodInfo

      public ChargingSchedulePeriodInfo(Duration startOffset, BigDecimal rateLimit, Integer numPhases)
      Constructor.
      Parameters:
      startOffset - the start offset from the start of the schedule
      rateLimit - the rate limit
      numPhases - the optional number of phases
      Throws:
      IllegalArgumentException - if startOffset or rateLimit are null
    • ChargingSchedulePeriodInfo

      public ChargingSchedulePeriodInfo(ChargingSchedulePeriodInfo other)
      Copy constructor.
      Parameters:
      other - the other info to copy
  • Method Details

    • isSameAs

      public boolean isSameAs(ChargingSchedulePeriodInfo other)
      Test if the properties of another entity are the same as in this instance.
      Parameters:
      other - the other entity to compare to
      Returns:
      true if the properties of this instance are equal to the other
    • differsFrom

      public boolean differsFrom(ChargingSchedulePeriodInfo other)
      Specified by:
      differsFrom in interface net.solarnetwork.domain.Differentiable<ChargingSchedulePeriodInfo>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getStartOffset

      public Duration getStartOffset()
      Get the start offset.
      Returns:
      the offset from the start of the schedule; never null
    • setStartOffset

      public void setStartOffset(Duration startOffset)
      Set the start offset.
      Parameters:
      startOffset - the offset from the start of the schedule to set
      Throws:
      IllegalArgumentException - if startOffset is null
    • getStartOffsetSeconds

      public int getStartOffsetSeconds()
      Get the start offset, in seconds.
      Returns:
      the offset from the start of the schedule
    • setStartOffsetSeconds

      public void setStartOffsetSeconds(int seconds)
      Set the start offset, in seconds.
      Parameters:
      seconds - the seconds
    • getRateLimit

      public BigDecimal getRateLimit()
      Get the rate limit.
      Returns:
      the limit; never null
    • setRateLimit

      public void setRateLimit(BigDecimal rateLimit)
      Set the rate limit.
      Parameters:
      rateLimit - the limit to set
      Throws:
      IllegalArgumentException - if rateLimit is null
    • getNumPhases

      public Integer getNumPhases()
      Get the number of phases.
      Returns:
      the phase count, or null if not applicable (e.g. DC charging)
    • setNumPhases

      public void setNumPhases(Integer numPhases)
      Set the number of phases.
      Parameters:
      numPhases - the phase count to set