package nsdb.LocationPackage;


/**
* nsdb/LocationPackage/LocationNode_u.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from corba/nsdb.idl
* Monday, August 23, 2004 12:02:40 PM BST
*/

public final class LocationNode_u implements org.omg.CORBA.portable.IDLEntity
{
  private nsdb.LocationPackage.LocVirtualSegment ___virtual;
  private String ___physical;
  private type.Fuzzy ___gap;
  private nsdb.LocationPackage.LocOperator ____operator;
  private int __discriminator;
  private boolean __uninitialized = true;

  public LocationNode_u ()
  {
  }

  public int discriminator ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    return __discriminator;
  }

  public nsdb.LocationPackage.LocVirtualSegment virtual ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyvirtual (__discriminator);
    return ___virtual;
  }

  public void virtual (nsdb.LocationPackage.LocVirtualSegment value)
  {
    __discriminator = nsdb.Location.VirtualSegment_ltc;
    ___virtual = value;
    __uninitialized = false;
  }

  private void verifyvirtual (int discriminator)
  {
    if (discriminator != nsdb.Location.VirtualSegment_ltc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public String physical ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyphysical (__discriminator);
    return ___physical;
  }

  public void physical (String value)
  {
    __discriminator = nsdb.Location.PhysicalSegment_ltc;
    ___physical = value;
    __uninitialized = false;
  }

  private void verifyphysical (int discriminator)
  {
    if (discriminator != nsdb.Location.PhysicalSegment_ltc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public type.Fuzzy gap ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifygap (__discriminator);
    return ___gap;
  }

  public void gap (type.Fuzzy value)
  {
    __discriminator = nsdb.Location.Gap_ltc;
    ___gap = value;
    __uninitialized = false;
  }

  private void verifygap (int discriminator)
  {
    if (discriminator != nsdb.Location.Gap_ltc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public nsdb.LocationPackage.LocOperator _operator ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verify_operator (__discriminator);
    return ____operator;
  }

  public void _operator (nsdb.LocationPackage.LocOperator value)
  {
    __discriminator = nsdb.Location.Operator_ltc;
    ____operator = value;
    __uninitialized = false;
  }

  private void verify_operator (int discriminator)
  {
    if (discriminator != nsdb.Location.Operator_ltc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public void _default ()
  {
    __discriminator = -2147483648;
    __uninitialized = false;
  }

  public void _default (int discriminator)
  {
    verifyDefault( discriminator ) ;
    __discriminator = discriminator ;
    __uninitialized = false;
  }

  private void verifyDefault( int value )
  {
    switch (value) {
      case nsdb.Location.VirtualSegment_ltc:
      case nsdb.Location.PhysicalSegment_ltc:
      case nsdb.Location.Gap_ltc:
      case nsdb.Location.Operator_ltc:
        throw new org.omg.CORBA.BAD_OPERATION() ;

      default:
        return;
    }
  }

} // class LocationNode_u
