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

de.agilecoders.wicket.util.Models Maven / Gradle / Ivy

The newest version!
package de.agilecoders.wicket.util;

import com.google.common.base.Strings;
import org.apache.wicket.model.IModel;

/**
 * helper class for {@link org.apache.wicket.model.IModel} handling.
 *
 * @author miha
 */
public final class Models {

    /**
     * Construct.
     */
    private Models() {
        throw new UnsupportedOperationException();
    }

    /**
     * checks if given model is not null and string object is also not null or empty.
     *
     * @param model The model to check
     * @return true, if model is null or empty
     */
    public static boolean isNullOrEmpty(IModel model) {
        return model == null || Strings.isNullOrEmpty(model.getObject());
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy