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

com.applitools.utils.ReadOnlyPropertyHandler Maven / Gradle / Ivy

There is a newer version: 5.76.0
Show newest version
package com.applitools.utils;

/**
 * A property handler for read-only properties (i.e., set always fails).
 */
public class ReadOnlyPropertyHandler implements PropertyHandler {
    private final T obj;

    public ReadOnlyPropertyHandler(T obj) {
        this.obj = obj;
    }

    /**
     * This method does nothing. It simply returns false.
     * @param obj The object to set.
     * @return Always returns false.
     */
    public boolean set(T obj) {
        return false;
    }

    /**
     * {@inheritDoc}
     */
    public T get() {
        return obj;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy