コード例 #1
0
 /**
  * Returns a property.
  *
  * @param name the name of the property to return.
  * @return the property value specified by name.
  */
 public static String getProperty(final String name) {
   if (manager == null) {
     synchronized (managerLock) {
       if (manager == null) {
         manager = new PropertyManager(propsName);
       }
     }
   }
   return manager.getProp(name);
 }
コード例 #2
0
 /**
  * Returns true if the enet.properties file exists where the path property purports that it does.
  */
 public static boolean propertyFileExists() {
   if (manager == null) {
     synchronized (managerLock) {
       if (manager == null) {
         manager = new PropertyManager(propsName);
       }
     }
   }
   return manager.propFileExists();
 }
コード例 #3
0
 /**
  * Deletes a enet property. If the property doesn't exist, the method does nothing.
  *
  * @param name the name of the property to delete.
  */
 public static void deleteProperty(final String name) {
   if (manager == null) {
     synchronized (managerLock) {
       if (manager == null) {
         manager = new PropertyManager(propsName);
       }
     }
   }
   manager.deleteProp(name);
 }
コード例 #4
0
 /**
  * Returns the names of the enet properties.
  *
  * @return an Enumeration of the enet property names.
  */
 public static Enumeration propertyNames() {
   if (manager == null) {
     synchronized (managerLock) {
       if (manager == null) {
         manager = new PropertyManager(propsName);
       }
     }
   }
   return manager.propNames();
 }
コード例 #5
0
 /**
  * Sets a enet property. If the property doesn't already exists, a new one will be created.
  *
  * @param name the name of the property being set.
  * @param value the value of the property being set.
  */
 public static void setProperty(final String name, final String value) {
   if (manager == null) {
     synchronized (managerLock) {
       if (manager == null) {
         manager = new PropertyManager(propsName);
       }
     }
   }
   manager.setProp(name, value);
 }