com.applitools.utils.ReadOnlyPropertyHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-sdk-core-java3 Show documentation
Show all versions of eyes-sdk-core-java3 Show documentation
Applitools Eyes SDK base for Java
The 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;
}
}