
jidefx.utils.comparator.ComparatorContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jidefx-comparators Show documentation
Show all versions of jidefx-comparators Show documentation
JideFX Common Layer is a collection of several extend feature for JavaFX
The newest version!
/*
* @(#)ComparatorContext.java 5/19/2013
*
* Copyright 2002 - 2013 JIDE Software Inc. All rights reserved.
*/
package jidefx.utils.comparator;
import javafx.collections.FXCollections;
import javafx.collections.ObservableMap;
import java.io.Serializable;
import java.util.HashMap;
/**
* The context object used by {@code ObjectComparatorManager}. For the same type, we may need different way to
* compare them. This context is used so that user can register different comparators for the same type.
*/
public class ComparatorContext implements Serializable {
private static final long serialVersionUID = -4846614433415551998L;
private String _name;
/**
* Default ComparatorContext with empty name and no user object.
*/
public static final ComparatorContext DEFAULT_CONTEXT = new ComparatorContext("");
/**
* Creates a ComparatorContext with a name.
*
* @param name the name of the ComparatorContext.
*/
public ComparatorContext(String name) {
_name = name;
}
/**
* Gets the name of the ComparatorContext.
*
* @return the name of the ComparatorContext
*/
public String getName() {
return _name;
}
/**
* Sets the name of the ComparatorContext.
*
* @param name the name of the ComparatorContext
*/
public void setName(String name) {
_name = name;
}
// A map containing a set of properties for this node
private ObservableMap
© 2015 - 2025 Weber Informatics LLC | Privacy Policy