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

com.vaadin.server.SerializableComparator Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.server;

import java.io.Serializable;
import java.util.Comparator;

/**
 * A {@link Comparator} that is also {@link Serializable}.
 * 

* You can create a serializable comparator from a regular comparator through a * method reference by appending ::compare. For example * SerializableComparator<Employee> * comparator = Comparator.comparing(Employee::getFirstName)::compare. * The resulting comparator will in most cases cause exceptions if it is * actually being serialized, but this construct will enable using the * shorthands in {@link Comparator} in applications where session will not be * serialized. * * @author Vaadin Ltd * @param * the type of objects that may be compared by this comparator * @since 8.0 * */ @FunctionalInterface public interface SerializableComparator extends Comparator, Serializable { // Relevant methods inherited from Comparator }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy