All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ujoframework.extensions.PropertyModifier Maven / Gradle / Ivy

There is a newer version: 1.22
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ujoframework.extensions;

/**
 * Property Setter
 * 
TODO: Can I remove the class ? * @author Ponec */ public class PropertyModifier { /** Write name into property if it is not locked yet. */ @SuppressWarnings("unchecked") public static void setName(String name, Property property) { boolean lock = property.isLock(); if (!lock) { int index = property.getIndex(); property.init(name, null, null, index, false); } } /** Set the new index and lock the property if it is not locked yet. */ @SuppressWarnings("unchecked") public static void setIndex(int anIndex, Property property) { boolean lock = property.isLock(); int index = property.getIndex(); if (!lock && index!=anIndex) { property.init(null, null, null, anIndex, true); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy