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 ConverterContextConverterContext 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.charvoidsetEchoChar(char echoChar) booleansupportFromString(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:ObjectConverterConverts from object to String based on current locale.- Specified by:
toStringin interfaceObjectConverter- Overrides:
toStringin 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:ObjectConverterIf it supports fromString.- Specified by:
supportFromStringin interfaceObjectConverter- Overrides:
supportFromStringin classDefaultObjectConverter- Parameters:
string- the stringcontext- context to be converted- Returns:
- true if it supports
-
fromString
Description copied from interface:ObjectConverterConverts from String to an object.- Specified by:
fromStringin interfaceObjectConverter- Overrides:
fromStringin classDefaultObjectConverter- Parameters:
string- the stringcontext- context to be converted- Returns:
- the object converted from string
-