FileDocCategorySizeDatePackage
SetOverrideType.javaAPI DocJava SE 5 API3420Fri Aug 26 14:58:32 BST 2005org.omg.CORBA

SetOverrideType

public class SetOverrideType extends Object implements org.omg.CORBA.portable.IDLEntity
The mapping of a CORBA enum tagging SET_OVERRIDE and ADD_OVERRIDE, which indicate whether policies should replace the existing policies of an Object or be added to them.

The method {@link omg.org.CORBA.Object._set_policy_override} takes either SetOverrideType.SET_OVERRIDE or SetOverrideType.ADD_OVERRIDE as its second argument. The method _set_policy_override creates a new Object initialized with the Policy objects supplied as the first argument. If the second argument is ADD_OVERRIDE, the new policies are added to those of the Object instance that is calling the _set_policy_override method. If SET_OVERRIDE is given instead, the existing policies are replaced with the given ones.

author
OMG
version
1.15 12/19/03
since
JDK1.2

Fields Summary
public static final int
_SET_OVERRIDE
The int constant for the enum value SET_OVERRIDE.
public static final int
_ADD_OVERRIDE
The int constant for the enum value ADD_OVERRIDE.
public static final SetOverrideType
SET_OVERRIDE
The SetOverrideType constant for the enum value SET_OVERRIDE.
public static final SetOverrideType
ADD_OVERRIDE
The SetOverrideType constant for the enum value ADD_OVERRIDE.
private int
_value
The field containing the value for this SetOverrideType object.
Constructors Summary
protected SetOverrideType(int _value)
Constructs a SetOverrideType instance from an int.

param
_value must be either SET_OVERRIDE or ADD_OVERRIDE

        this._value = _value;
    
Methods Summary
public static org.omg.CORBA.SetOverrideTypefrom_int(int i)
Converts the given int to the corresponding SetOverrideType instance.

param
i the int to convert; must be either SetOverrideType._SET_OVERRIDE or SetOverrideType._ADD_OVERRIDE
return
the SetOverrideType instance whose value matches the given int
exception
BAD_PARAM if the given int does not match the value of any SetOverrideType instance

        switch (i) {
	case _SET_OVERRIDE:
	    return SET_OVERRIDE;
	case _ADD_OVERRIDE:
	    return ADD_OVERRIDE;
	default:
	    throw new org.omg.CORBA.BAD_PARAM();
        }
    
public intvalue()
Retrieves the value of this SetOverrideType instance.

return
the int for this SetOverrideType instance.


                        
       
        return _value;