Interface VarianceRule

All Superinterfaces:
Identified
All Known Implementing Classes:
AnythingRule, ContainingTypeRule, EmptyListRule, EqualityRule, GeometryRule, JavaRule, LinkedTypeRule, LookupTableTypeRule, NothingRule, NullableTargetRule, SameRule, WrappingTypesRule

public interface VarianceRule extends Identified

Variance rules allow the type system to advise whether one type's values can be directly assigned to another without having to alter the receiving type (and consequently value).

RiskScape's type system is extendable, allowing users to define their own custom types. VarianceRules are away of extending the type system further, to advise whether a value of one type can be assigned safely to a value of another type.