|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.validation.api.conversion.Converter<From,To>
public abstract class Converter<From,To>
Converts a validator of one type to a validator that works against a
different type. In this way, it is possible to write only validators
for Strings, but use them against javax.swing.text.Document
s, etc.
Constructor Summary | |
---|---|
Converter()
|
Method Summary | ||
---|---|---|
Validator<To> |
convert(Validator<From>... froms)
|
|
abstract Validator<To> |
convert(Validator<From> from)
Create a validator for type To by wrapping a validator for type From. |
|
static
|
find(java.lang.Class<From> from,
java.lang.Class<To> to)
Find a converter to create validators for one type from validators for another type. |
|
static
|
register(java.lang.Class<From> from,
java.lang.Class<To> to,
Converter<From,To> converter)
Register a converter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Converter()
Method Detail |
---|
public abstract Validator<To> convert(Validator<From> from)
from
- The original validator.
public final Validator<To> convert(Validator<From>... froms)
public static <From,To> void register(java.lang.Class<From> from, java.lang.Class<To> to, Converter<From,To> converter)
From
- To
- from
- to
- converter
- public static <From,To> Converter<From,To> find(java.lang.Class<From> from, java.lang.Class<To> to)
From
- The type of object we get from a component, such as a
javax.swing.text.Document
To
- The type of object we want to process, such as a
java.lang.String
from
- A class, such as Document.class
to
- A class such as String.class
From
and produce validators for type To
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |