KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > Connector > Property


1 package SOFA.Connector;
2
3 /** Property.
4   * Generated by SOFA CodeGen.
5   */

6
7 public final class Property implements cz.cuni.sofa.lib.CDLEntity {
8   public java.lang.String JavaDoc name = null;
9   public java.lang.String JavaDoc value = null;
10   
11   public Property() {}
12   
13   public Property(java.lang.String JavaDoc _name, java.lang.String JavaDoc _value) {
14     name = _name;
15     value = _value;
16   }
17   
18   /** Search property with given name.
19     * @param props array with properties
20     * @param name name of the property
21     * @return property value
22     */

23   static public String JavaDoc findFirst(Property[] props, String JavaDoc name) {
24     int i;
25     for (i=0;i<props.length;i++) {
26       if (props[i].name.equals(name)) {
27         return props[i].value;
28       }
29     }
30     return null;
31   }
32 }
33
Popular Tags