001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020 package org.apache.directory.server.kerberos.shared.messages.value.flags; 021 022 /** 023 * 024 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 025 * 026 */ 027 public interface KerberosFlags 028 { 029 /** 030 * @return The byte array for a KerberosFlags 031 */ 032 byte[] getBytes(); 033 034 035 /** 036 * Returns the int value associated with the flags 037 */ 038 int getIntValue(); 039 040 041 /** 042 * Check if a flag is set for the actual value 043 * 044 * @param flag The flag to check 045 * @return True if the flag is set in the list of flags 046 */ 047 boolean isFlagSet( KerberosFlag flag ); 048 049 050 /** 051 * Check if a flag is set 052 * @param flag The flags to test 053 * @return True if the flag is set in the list of flags 054 */ 055 boolean isFlagSet( int flag ); 056 057 058 /** 059 * Set a flag in a list of flags 060 * 061 * @param flag The flag to set 062 */ 063 void setFlag( KerberosFlag flag ); 064 065 066 /** 067 * Set a flag in a list of flags 068 * 069 * @param flag The flag to set 070 */ 071 void setFlag( int flag ); 072 073 074 /** 075 * clear a flag in a list of flags 076 * 077 * @param flag The flag to set 078 */ 079 void clearFlag( KerberosFlag flag ); 080 081 082 /** 083 * clear a flag in a list of flags 084 * 085 * @param flag The flag to set 086 */ 087 void clearFlag( int flag ); 088 }