1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 * 19 */ 20 package org.apache.directory.shared.kerberos.flags; 21 22 23 /** 24 * 25 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 26 * 27 */ 28 public interface KerberosFlags 29 { 30 /** 31 * Returns the int value associated with the flags 32 */ 33 int getIntValue(); 34 35 36 /** 37 * Check if a flag is set for the actual value 38 * 39 * @param flag The flag to check 40 * @return True if the flag is set in the list of flags 41 */ 42 boolean isFlagSet( KerberosFlag flag ); 43 44 45 /** 46 * Check if a flag is set 47 * @param flag The flags to test 48 * @return True if the flag is set in the list of flags 49 */ 50 boolean isFlagSet( int flag ); 51 52 53 /** 54 * Set a flag in a list of flags 55 * 56 * @param flag The flag to set 57 */ 58 void setFlag( KerberosFlag flag ); 59 60 61 /** 62 * Set a flag in a list of flags 63 * 64 * @param flag The flag to set 65 */ 66 void setFlag( int flag ); 67 68 69 /** 70 * clear a flag in a list of flags 71 * 72 * @param flag The flag to set 73 */ 74 void clearFlag( KerberosFlag flag ); 75 76 77 /** 78 * clear a flag in a list of flags 79 * 80 * @param flag The flag to set 81 */ 82 void clearFlag( int flag ); 83 }