package Module 4;
public final class ForecastDetail
implements org.omg.CORBA.portable.IDLEntity
{
.....
private double windchill;
...
private double windchill()
{
if (discriminator != Module4.ForecastType.cold)
throw new org.omg.CORBA.BAD_OPERATION();
return windchill;
}
public void windchill(double _x)
{
discriminator = Module4.ForecastType.cold;
windchill = _x;
}
The cold/wind chill branch is mapped to the corresponding field, an accessor, and a mutator.