AT&T 2.0.19 Code drop, stage 1
[aaf/authz.git] / misc / env / src / main / java / org / onap / aaf / misc / env / StaticSlot.java
1 /**
2  * ============LICENSE_START====================================================
3  * org.onap.aaf
4  * ===========================================================================
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6  * ===========================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END====================================================
19  *
20  */
21
22 /**
23  * Slot.java
24  *
25  * Created on: Dec 5, 2008
26  * Created by: Jonathan
27  *
28  * (c)2008 SBC Knowledge Ventures, L.P. All rights reserved.
29  ******************************************************************* 
30  * RESTRICTED - PROPRIETARY INFORMATION The Information contained 
31  * herein is for use only by authorized employees of AT&T Services, 
32  * Inc., and authorized Affiliates of AT&T Services, Inc., and is 
33  * not for general distribution within or outside the respective 
34  * companies. 
35  *******************************************************************
36  */
37 package org.onap.aaf.misc.env;
38
39 /**
40  * StaticSlot's are used to store and retrieve data from the Organizer that does not change.
41  */
42 public final class StaticSlot {
43
44         /*
45          * The name of the StaticSlot.
46          */
47         private final String key;
48         
49         /*
50          * The index of the Organizer's static map associated with this StaticSlot.
51          */
52         final int slot; 
53         
54         /**
55          * Constructs a new StaticSlot.
56          * 
57          * @param index
58          *                      The index of Organizer's static map this StaticSlot is associated with.
59          * @param name
60          *                      The name of the StaticSlot's key.
61          */
62         StaticSlot(int index, String name) {
63                 slot = index;
64                 key = name;
65         }
66         
67         /**
68          * Debug method only to print key=slot pairs.
69          */
70         public String toString() {
71                 return key + '=' + slot;
72         }
73         
74         /**
75          * Returns the name of this StaticSlot's key.
76          * 
77          * @return
78          *                      The name of this StaticSlot's key.
79          */
80         public String getKey() {
81                 return key;
82         }
83
84 }
85