46 |
* Defines the instruction, how the newly specified policies can be |
* Defines the instruction, how the newly specified policies can be |
47 |
* taken into consideration. The policies can be either |
* taken into consideration. The policies can be either |
48 |
* added to the current policies or replace them. |
* added to the current policies or replace them. |
49 |
* |
* |
50 |
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) |
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) |
51 |
*/ |
*/ |
52 |
public class SetOverrideType |
public class SetOverrideType |
60 |
/** |
/** |
61 |
* Add the new policies to the existing policies. |
* Add the new policies to the existing policies. |
62 |
*/ |
*/ |
63 |
static final int _ADD_OVERRIDE = 1; |
public static final int _ADD_OVERRIDE = 1; |
64 |
|
|
65 |
/** |
/** |
66 |
* Replace the new existing policies by the new policies. |
* Replace the new existing policies by the new policies. |
67 |
*/ |
*/ |
68 |
static final int _SET_OVERRIDE = 0; |
public static final int _SET_OVERRIDE = 0; |
69 |
|
|
70 |
/** |
/** |
71 |
* Add the new policies to the existing policies. |
* Add the new policies to the existing policies. |
80 |
*/ |
*/ |
81 |
public static final SetOverrideType SET_OVERRIDE = |
public static final SetOverrideType SET_OVERRIDE = |
82 |
new SetOverrideType(_SET_OVERRIDE); |
new SetOverrideType(_SET_OVERRIDE); |
83 |
|
|
84 |
private final int _value; |
private final int _value; |
85 |
|
|
86 |
/** |
/** |
87 |
* No other instances can be created. |
* No other instances can be created. |
88 |
*/ |
*/ |
89 |
private SetOverrideType(int a_value) |
protected SetOverrideType(int a_value) |
90 |
{ |
{ |
91 |
_value = a_value; |
_value = a_value; |
92 |
} |
} |
96 |
* @param kind one of _ADD_OVERRIDE or _SET_OVERRIDE. |
* @param kind one of _ADD_OVERRIDE or _SET_OVERRIDE. |
97 |
* |
* |
98 |
* @return one of ADD_OVERRIDE or SET_OVERRIDE. |
* @return one of ADD_OVERRIDE or SET_OVERRIDE. |
99 |
* |
* |
100 |
* @throws BAD_PARAM if the parameter is not one of these two values. |
* @throws BAD_PARAM if the parameter is not one of these two values. |
101 |
*/ |
*/ |
102 |
public static SetOverrideType from_int(int kind) |
public static SetOverrideType from_int(int kind) |
116 |
|
|
117 |
/** |
/** |
118 |
* Returns a short string representation. |
* Returns a short string representation. |
119 |
* |
* |
120 |
* @return either "add" or "replace". |
* @return either "add" or "replace". |
121 |
*/ |
*/ |
122 |
public String toString() |
public String toString() |
126 |
|
|
127 |
/** |
/** |
128 |
* Returns the value, representing stored instruction. |
* Returns the value, representing stored instruction. |
129 |
* |
* |
130 |
* @return one of ADD_OVERRIDE or SET_OVERRIDE |
* @return one of ADD_OVERRIDE or SET_OVERRIDE |
131 |
*/ |
*/ |
132 |
public int value() |
public int value() |