Record Class AbstractReducedLoadingLimits.ReducedTemporaryLimit
java.lang.Object
java.lang.Record
com.powsybl.security.limitreduction.result.AbstractReducedLoadingLimits.ReducedTemporaryLimit
- All Implemented Interfaces:
LoadingLimits.TemporaryLimit
- Enclosing class:
- AbstractReducedLoadingLimits
public static record AbstractReducedLoadingLimits.ReducedTemporaryLimit(String name, double value, int acceptableDuration, boolean fictitious, double originalValue, double limitReduction)
extends Record
implements LoadingLimits.TemporaryLimit
-
Constructor Summary
ConstructorDescriptionReducedTemporaryLimit
(String name, double value, int acceptableDuration, boolean fictitious, double originalValue, double limitReduction) Creates an instance of aReducedTemporaryLimit
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of theacceptableDuration
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thefictitious
record component.int
Get the acceptable duration of the limit in second.double
getName()
Get the temporary limit namedouble
double
getValue()
Get the temporary limit value.final int
hashCode()
Returns a hash code value for this object.boolean
Check if the temporary limit is a real limit corresponding to an overloading protection or just an operating ruledouble
Returns the value of thelimitReduction
record component.name()
Returns the value of thename
record component.double
Returns the value of theoriginalValue
record component.final String
toString()
Returns a string representation of this record class.double
value()
Returns the value of thevalue
record component.
-
Constructor Details
-
ReducedTemporaryLimit
public ReducedTemporaryLimit(String name, double value, int acceptableDuration, boolean fictitious, double originalValue, double limitReduction) Creates an instance of aReducedTemporaryLimit
record class.- Parameters:
name
- the value for thename
record componentvalue
- the value for thevalue
record componentacceptableDuration
- the value for theacceptableDuration
record componentfictitious
- the value for thefictitious
record componentoriginalValue
- the value for theoriginalValue
record componentlimitReduction
- the value for thelimitReduction
record component
-
-
Method Details
-
getName
Description copied from interface:LoadingLimits.TemporaryLimit
Get the temporary limit name- Specified by:
getName
in interfaceLoadingLimits.TemporaryLimit
- Returns:
- the temporary limit name
-
getValue
public double getValue()Description copied from interface:LoadingLimits.TemporaryLimit
Get the temporary limit value.- Specified by:
getValue
in interfaceLoadingLimits.TemporaryLimit
- Returns:
- the temporary limit value
-
getAcceptableDuration
public int getAcceptableDuration()Description copied from interface:LoadingLimits.TemporaryLimit
Get the acceptable duration of the limit in second.- Specified by:
getAcceptableDuration
in interfaceLoadingLimits.TemporaryLimit
- Returns:
- the acceptable duration of the limit in second
-
isFictitious
public boolean isFictitious()Description copied from interface:LoadingLimits.TemporaryLimit
Check if the temporary limit is a real limit corresponding to an overloading protection or just an operating rule- Specified by:
isFictitious
in interfaceLoadingLimits.TemporaryLimit
- Returns:
- false if it is a real limit, false otherwise
-
getOriginalValue
public double getOriginalValue() -
getLimitReduction
public double getLimitReduction() -
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
value
public double value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
acceptableDuration
public int acceptableDuration()Returns the value of theacceptableDuration
record component.- Returns:
- the value of the
acceptableDuration
record component
-
fictitious
public boolean fictitious()Returns the value of thefictitious
record component.- Returns:
- the value of the
fictitious
record component
-
originalValue
public double originalValue()Returns the value of theoriginalValue
record component.- Returns:
- the value of the
originalValue
record component
-
limitReduction
public double limitReduction()Returns the value of thelimitReduction
record component.- Returns:
- the value of the
limitReduction
record component
-