Package de.xima.fc.common.function.accessor
Package containing various interfaces for generic accessors. An accessor is defined by its ability to get a certain
type of value from an object, and to set a value to an object. Accessors are usually pure functions that do not have
any state. An accessor always has the following signature (you can use this as a template for new accessor, simply
search and replace the word "Property" with the name of the property, "Class" with the type name of the property, and
"description" with a short description of the property; then use the IDE to move the inner interfaces to their own
files):
package de.xima.fc.common.accessor;
import de.xima.fc.common.function.accessor.IPropertyAccessor.IPropertyGetter;
import de.xima.fc.common.function.accessor.IPropertyAccessor.IPropertySetter;
/**
* Accessor (getter+setter) for the description.
* @param <Holder> Type of the object that contains the information.
* @author XIMA MEDIA GmbH
*/
public interface IPropertyAccessor<Holder> extends
IPropertyGetter<Holder>, IPropertySetter<Holder> {
/**
* Getter for the description.
* @param <Holder> Type of the object that contains the information.
* @author XIMA MEDIA GmbH
*/
@FunctionalInterface
interface IPropertyGetter<Holder> {
/**
* Gets the description.
* @param object The object that holds the information.
* @return The description.
*/
Class getProperty(Holder object);
}
/**
* Setter for the description.
* @param <Holder> Type of the object that contains the information.
* @author XIMA MEDIA GmbH
*/
@FunctionalInterface
interface IPropertySetter<Holder> {
/**
* Sets the description.
* @param object The object that holds the information.
* @param value The description.
*/
void setProperty(Holder object, Class value);
}
}
-
Interface Summary Interface Description ICreatedAtAccessor<Holder> Accessor (getter+setter) for the time when an object was created.ICreatedAtGetter<Holder> Getter for the time when an object was created.ICreatedAtSetter<Holder> Setter for the time when an object was created.ICreatedByAccessor<Holder> Accessor (getter+setter) for the name of the user who created an object.ICreatedByGetter<Holder> Getter for the name of the user who created an object.ICreatedBySetter<Holder> Setter for the name of the user who created an object.IFileSizeAccessor<Holder> Accessor (getter+setter) for the file size of an object representing a file.IFileSizeGetter<Holder> Getter for the file size of an object representing a file.IFileSizeSetter<Holder> Setter for the file size of an object representing a file.ILastModifiedAtAccessor<Holder> Accessor (getter+setter) for the time when the last modification to an object was made.ILastModifiedAtGetter<Holder> Getter for the time when the last modification to an object was made.ILastModifiedAtSetter<Holder> Setter for the time when the last modification to an object was made.ILastModifiedByAccessor<Holder> Accessor (getter+setter) for the name of the user who made the last modification to an object.ILastModifiedByGetter<Holder> Getter for the name of the user who made the last modification to an object.ILastModifiedBySetter<Holder> Setter for the name of the user who made the last modification to an object.IScopeAccessor<Holder,Scope> Accessor (getter+setter) for the scope of an object.IScopeGetter<Holder,Scope> Getter for the scope of an object.IScopeSetter<Holder,Scope> Setter for the scope of an object.