Class CheckedCoPair_R<L,R>

java.lang.Object
eu.bandm.tools.umod.runtime.UncheckedCoPair<L,R>
eu.bandm.tools.umod.runtime.CheckedCoPair_R<L,R>
Type Parameters:
L - the type of the left alternatives
R - the type of the right alternatives
All Implemented Interfaces:
CoPair<L,R>, CoPair_checkedRight<L,R>, Serializable

public class CheckedCoPair_R<L,R> extends UncheckedCoPair<L,R> implements CoPair_checkedRight<L,R>
Facade to "CoPair" operations and guarantees strictness of right variant, by overwriting "set_right()"
See Also:
  • Constructor Details

    • CheckedCoPair_R

      public CheckedCoPair_R(@Opt L left)
      Create a copair of the "left" alternative.
      Parameters:
      left - the value stored in this copair.
    • CheckedCoPair_R

      public CheckedCoPair_R(boolean b, R right)
      Create a copair of the "right" alternative.
      Parameters:
      b - a marker parameter which chooses the right alternative. Can have arbitrary value.
      right - the value stored in this copair.
      Throws:
      NullPointerException - if the argument is null.
    • CheckedCoPair_R

      public CheckedCoPair_R(CoPair<L,R> p)
      Create a copair with the same values as the prototype.
      Parameters:
      p - the prototype
      Throws:
      NullPointerException - if the argument realizes the right variant and has the null value.
  • Method Details