Package com.jidesoft.converter
Class AbstractContext
java.lang.Object
com.jidesoft.converter.AbstractContext
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ComparatorContext,ConverterContext,GrouperContext
AbstractContext is a generic context class. It has two fields: name and userObject. The name is just the
name of the context. You can use a meaningful string to name it. The userObject is customizable portion of Context.
You can set whatever you want as userObject. It's just a convention between whoever set it and whoever use it. For
example, in ConverterContext, we sometimes used it to pass in a Format.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractContext(String name) Creates a namedAbstractContext.AbstractContext(String name, Object object) Creates an abstract context with a name and an object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanOverride equals.getName()Gets the name of the abstract context.Gets the user object.inthashCode()voidSets the name of the abstract context.voidsetUserObject(Object userObject) Sets the user object.toString()
-
Constructor Details
-
AbstractContext
Creates a namedAbstractContext.- Parameters:
name- the name of theAbstractContext.
-
AbstractContext
Creates an abstract context with a name and an object.- Parameters:
name- the name of theAbstractContext.object- the user object. It can be used any object to pass information along.
-
-
Method Details
-
getName
Gets the name of the abstract context.- Returns:
- the name of the abstract context
-
setName
Sets the name of the abstract context.- Parameters:
name- the name of the abstract context
-
getUserObject
Gets the user object.- Returns:
- the user object
-
setUserObject
Sets the user object.- Parameters:
userObject- the user object.
-
equals
Override equals. Two abstract context equals as long as the name is the same. -
hashCode
public int hashCode() -
toString
-