KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > ior > ObjectAdapterIdArray


1 /*
2  * @(#)ObjectAdapterIdArray.java 1.6 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.ior ;
9
10 import java.util.Iterator JavaDoc ;
11 import java.util.Arrays JavaDoc ;
12
13 public class ObjectAdapterIdArray extends ObjectAdapterIdBase {
14     private final String JavaDoc[] objectAdapterId ;
15
16     public ObjectAdapterIdArray( String JavaDoc[] objectAdapterId )
17     {
18     this.objectAdapterId = objectAdapterId ;
19     }
20
21     /** Special constructor used for OA IDs of length 2.
22      */

23     public ObjectAdapterIdArray( String JavaDoc name1, String JavaDoc name2 )
24     {
25     objectAdapterId = new String JavaDoc[2] ;
26     objectAdapterId[0] = name1 ;
27     objectAdapterId[1] = name2 ;
28     }
29
30     public int getNumLevels()
31     {
32     return objectAdapterId.length ;
33     }
34
35     public Iterator JavaDoc iterator()
36     {
37     return Arrays.asList( objectAdapterId ).iterator() ;
38     }
39
40     public String JavaDoc[] getAdapterName()
41     {
42     return (String JavaDoc[])(objectAdapterId.clone()) ;
43     }
44 }
45
Popular Tags