|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WrapAbilities
describes the abilities of some object to create wrappers
that convert an object of type A to an object of type B, and with what fraction of accuracy.
The object must be able to take in an arbitrary object and output an other arbitrary object,
defined by the type of object input and type of object requested.
For example, convert double[] to String or convert double[][] to String[].
SETGET wrapCreator = ...;
WrapAbilities wa = (WrapAbilities) wrapCreator.GETL(WrapAbilities.class);
if(
wrapCreator.SETL(new double[][]{...});
String s[] = wrapCreator
unfinished...
Nested Class Summary | |
---|---|
static class |
WrapAbilities.WrapWrapAbilities
wrap a subclass of WrapAbilities in this to limit it to the functions of WrapAbilities. |
Method Summary | |
---|---|
double |
accuracyOfWrap(java.lang.Class from,
java.lang.Class to)
returns 0 if can not wrap that way, else returns a number between 0 and 1. |
double |
costOfWrap(java.lang.Class from,
java.lang.Class to)
default should be 1000 |
java.util.List<java.lang.Class> |
getAllFrom()
all types of input objects that can be used to create at least 1 other type of object each, (and optionally with preferred classes at lower index) |
java.util.List<java.lang.Class> |
getAllFromForThisTo(java.lang.Class to)
returns all input types that can be converted to the 'to' type, (and optionally with preferred classes at lower index) |
java.util.List<java.lang.Class> |
getAllTo()
all types that can be created, given the required input object, (and optionally with preferred classes at lower index) |
java.util.List<java.lang.Class> |
getAllToForThisFrom(java.lang.Class from)
returns all output types that can be converted to the 'from' type, (and optionally with preferred classes at lower index) |
java.util.List<WrapAbility> |
getAllWrapAbilitys()
beware: these could be generated at the time this function is called |
Method Detail |
---|
double accuracyOfWrap(java.lang.Class from, java.lang.Class to)
double costOfWrap(java.lang.Class from, java.lang.Class to)
java.util.List<java.lang.Class> getAllFrom()
java.util.List<java.lang.Class> getAllTo()
java.util.List<java.lang.Class> getAllFromForThisTo(java.lang.Class to)
java.util.List<java.lang.Class> getAllToForThisFrom(java.lang.Class from)
java.util.List<WrapAbility> getAllWrapAbilitys()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |