Package com.jidesoft.converter
Class PasswordConverter
- java.lang.Object
-
- com.jidesoft.converter.DefaultObjectConverter
-
- com.jidesoft.converter.PasswordConverter
-
- All Implemented Interfaces:
ObjectConverter
public class PasswordConverter extends DefaultObjectConverter
Converter which converts String to String and converts it back.
-
-
Field Summary
Fields Modifier and Type Field Description static ConverterContext
CONTEXT
ConverterContext if the String is a file name.
-
Constructor Summary
Constructors Constructor Description PasswordConverter()
PasswordConverter(char echoChar)
Creates a PasswordConverter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
fromString(java.lang.String string, ConverterContext context)
Converts from String to an object.char
getEchoChar()
void
setEchoChar(char echoChar)
boolean
supportFromString(java.lang.String string, ConverterContext context)
If it supports fromString.java.lang.String
toString(java.lang.Object object, ConverterContext context)
Converts from object to String based on current locale.-
Methods inherited from class com.jidesoft.converter.DefaultObjectConverter
supportToString
-
-
-
-
Field Detail
-
CONTEXT
public static ConverterContext CONTEXT
ConverterContext if the String is a file name.
-
-
Method Detail
-
toString
public java.lang.String toString(java.lang.Object object, ConverterContext context)
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
public boolean supportFromString(java.lang.String string, ConverterContext context)
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
public java.lang.Object fromString(java.lang.String string, ConverterContext context)
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
-
-