Package com.jidesoft.converter
Class PasswordConverter
java.lang.Object
com.jidesoft.converter.DefaultObjectConverter
com.jidesoft.converter.PasswordConverter
- All Implemented Interfaces:
ObjectConverter
Converter which converts String to String and converts it back.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ConverterContext
ConverterContext if the String is a file name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromString
(String string, ConverterContext context) Converts from String to an object.char
void
setEchoChar
(char echoChar) boolean
supportFromString
(String string, ConverterContext context) If it supports fromString.toString
(Object object, ConverterContext context) Converts from object to String based on current locale.Methods inherited from class com.jidesoft.converter.DefaultObjectConverter
supportToString
-
Field Details
-
CONTEXT
ConverterContext if the String is a file name.
-
-
Constructor Details
-
PasswordConverter
public PasswordConverter() -
PasswordConverter
public PasswordConverter(char echoChar) Creates a PasswordConverter.- Parameters:
echoChar
- The echo char. It is used to replace the real password so that other people can't see what user is typing.
-
-
Method Details
-
toString
Description copied from interface:ObjectConverter
Converts from object to String based on current locale.- Specified by:
toString
in interfaceObjectConverter
- Overrides:
toString
in classDefaultObjectConverter
- Parameters:
object
- object to be convertedcontext
- converter context to be used- Returns:
- the String
-
getEchoChar
public char getEchoChar() -
setEchoChar
public void setEchoChar(char echoChar) -
supportFromString
Description copied from interface:ObjectConverter
If it supports fromString.- Specified by:
supportFromString
in interfaceObjectConverter
- Overrides:
supportFromString
in classDefaultObjectConverter
- Parameters:
string
- the stringcontext
- context to be converted- Returns:
- true if it supports
-
fromString
Description copied from interface:ObjectConverter
Converts from String to an object.- Specified by:
fromString
in interfaceObjectConverter
- Overrides:
fromString
in classDefaultObjectConverter
- Parameters:
string
- the stringcontext
- context to be converted- Returns:
- the object converted from string
-