|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodesimian.wrap.ListInListOutWrapAbilities
public class ListInListOutWrapAbilities
unlike DefaultWrapAbilities, ListInListOutWrapAbilities does not consider Classes in pairs. It has a list of ok input classes and a list of ok output classes, and any input class may be cast to any output class. It also has a cost for each class, and the cost for x converted to y is the sum of x cost and y cost, but no pairs of cost. Similarly it has an accuracy for each class, but no pairs of accuracy.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface codesimian.wrap.WrapAbilities |
---|
WrapAbilities.WrapWrapAbilities |
Constructor Summary | |
---|---|
ListInListOutWrapAbilities(java.lang.Class[] in,
double[] inAccuracy,
double[] inCost,
java.lang.Class[] out,
double[] outAccuracy,
double[] outCost)
|
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()
Wastes memory and is slow because all inputs can be converted to all outputs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListInListOutWrapAbilities(java.lang.Class[] in, double[] inAccuracy, double[] inCost, java.lang.Class[] out, double[] outAccuracy, double[] outCost)
Method Detail |
---|
public double accuracyOfWrap(java.lang.Class from, java.lang.Class to)
WrapAbilities
accuracyOfWrap
in interface WrapAbilities
public double costOfWrap(java.lang.Class from, java.lang.Class to)
WrapAbilities
costOfWrap
in interface WrapAbilities
public java.util.List<java.lang.Class> getAllFrom()
WrapAbilities
getAllFrom
in interface WrapAbilities
public java.util.List<java.lang.Class> getAllTo()
WrapAbilities
getAllTo
in interface WrapAbilities
public java.util.List<java.lang.Class> getAllFromForThisTo(java.lang.Class to)
WrapAbilities
getAllFromForThisTo
in interface WrapAbilities
public java.util.List<java.lang.Class> getAllToForThisFrom(java.lang.Class from)
WrapAbilities
getAllToForThisFrom
in interface WrapAbilities
public java.util.List<WrapAbility> getAllWrapAbilitys()
getAllWrapAbilitys
in interface WrapAbilities
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |