Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/flexstor/common/util/DiagnosticCategory.java


1   /*
2    * DiagnosticCategory.java
3    *
4    * Copyright $Date: 2003/08/11 02:22:31 $ FLEXSTOR.net Inc.
5    *
6    * This work is licensed for use and distribution under license terms found at
7    * http://www.flexstor.org/license.html
8    *
9    */
10  
11  package com.flexstor.common.util;
12  
13  /**
14   * Revision 1.3 2000-09-28 : 22:51:00 Visesh
15   * This class no longer extends DiagnosticCategoryI 
16   * This change has been made to remove circular dependencies
17  */
18  public class DiagnosticCategory
19  {
20  
21     private String sName;
22     
23       
24     public DiagnosticCategory() { super(); }
25  
26     public DiagnosticCategory(String sName)
27     {
28        this.sName = sName;
29     }
30        
31     public String toString()
32     {
33        return sName;
34     }
35     
36     public static DiagnosticCategory getCategory(String sName)
37     {
38        DiagnosticCategory[] categories = DiagnosticCategoryI.categories;
39        for (int i = 0; i < categories.length; i++)
40        {
41           if (categories[i].toString().equals(sName))
42              return categories[i];
43        }
44        return null;
45     }
46  }