/** * 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); }
/** * 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(); }
/** * 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); }
/** * 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(); }
/** * 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); }