View Javadoc

1   /*
2    * Copyright [2005] [University Corporation for Advanced Internet Development, Inc.]
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.opensaml.saml2.core;
18  
19  /**
20   * A type safe enumeration of {@link org.opensaml.saml2.core.RequestedAuthnContext} comparison types.
21   */
22  public final class AuthnContextComparisonTypeEnumeration {
23  
24      /** "exact" comparison type. */
25      public static final AuthnContextComparisonTypeEnumeration EXACT = 
26          new AuthnContextComparisonTypeEnumeration("exact");
27  
28      /** "minimum" comparison type. */
29      public static final AuthnContextComparisonTypeEnumeration MINIMUM = 
30          new AuthnContextComparisonTypeEnumeration("minimum");
31  
32      /** "maximum" comparison type. */
33      public static final AuthnContextComparisonTypeEnumeration MAXIMUM = 
34          new AuthnContextComparisonTypeEnumeration("maximum");
35  
36      /** "better" comparison type. */
37      public static final AuthnContextComparisonTypeEnumeration BETTER = 
38          new AuthnContextComparisonTypeEnumeration("better");
39  
40      /** The comparison type string. */
41      private String comparisonType;
42  
43      /**
44       * Constructor.
45       * 
46       * @param newComparisonType the comparison type string
47       */
48      protected AuthnContextComparisonTypeEnumeration(String newComparisonType) {
49          this.comparisonType= newComparisonType;
50      }
51  
52      /** {@inheritDoc} */
53      public String toString() {
54          return comparisonType;
55      }
56  }