01: /*
02: * @(#)ComparatorContext.java 5/13/2005
03: *
04: * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
05: */
06: package com.jidesoft.comparator;
07:
08: import com.jidesoft.converter.AbstractContext;
09:
10: /**
11: * The context object used by <code>ObjectComparatorManager</code>.
12: * For the same type, we may need different way to compare them. This context
13: * is used so that user can register different comparators for the same type.
14: */
15: public class ComparatorContext extends AbstractContext {
16: /**
17: * Default comparator context with empty name and no user object.
18: */
19: public final static ComparatorContext DEFAULT_CONTEXT = new ComparatorContext(
20: "");
21:
22: /**
23: * Creates a comparator context with a name.
24: *
25: * @param name the name of the comparator context.
26: */
27: public ComparatorContext(String name) {
28: super (name);
29: }
30:
31: /**
32: * Creates a comparator contex with a name and a user object.
33: *
34: * @param name the name of the comparator context.
35: * @param object the user object. It can be used as any object to pass informaton along.
36: */
37: public ComparatorContext(String name, Object object) {
38: super(name, object);
39: }
40: }
|