|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcodesimian.wrap.DefaultWrapAbilities
public class DefaultWrapAbilities
starts empty. add any abilities. Each WrapAbility is a FROM Class, a TO Class,
and an optional ACCURACY and COST for the conversion.
This is called DefaultWrapAbilities because it is the default implementation of WrapAbilities.
It does not contain any abilities by default. You have to add them.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface codesimian.wrap.WrapAbilities |
|---|
WrapAbilities.WrapWrapAbilities |
| Field Summary | |
|---|---|
static double |
COST_OF_IMPOSSIBLE
|
| Constructor Summary | |
|---|---|
DefaultWrapAbilities()
|
|
| 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. |
void |
addWrapAbility(java.lang.Class from,
java.lang.Class to)
|
void |
addWrapAbility(java.lang.Class from,
java.lang.Class to,
double accuracy)
|
void |
addWrapAbility(java.lang.Class from,
java.lang.Class to,
double accuracy,
double cost)
|
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 |
java.util.List<java.lang.Class> |
getAllFromForThisTo(java.lang.Class to)
returns all input types that can be converted to the 'to' type |
java.util.List<java.lang.Class> |
getAllTo()
all types that can be created, given the required input object |
java.util.List<java.lang.Class> |
getAllToForThisFrom(java.lang.Class from)
returns all output types that can be converted to the 'from' type |
java.util.List<WrapAbility> |
getAllWrapAbilitys()
beware: these could be generated at the time this function is called |
static void |
main(java.lang.String[] s)
test |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double COST_OF_IMPOSSIBLE
| Constructor Detail |
|---|
public DefaultWrapAbilities()
| 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 void addWrapAbility(java.lang.Class from,
java.lang.Class to)
public void addWrapAbility(java.lang.Class from,
java.lang.Class to,
double accuracy)
public void addWrapAbility(java.lang.Class from,
java.lang.Class to,
double accuracy,
double cost)
public java.util.List<java.lang.Class> getAllFrom()
getAllFrom in interface WrapAbilitiespublic java.util.List<java.lang.Class> getAllTo()
getAllTo in interface WrapAbilitiespublic java.util.List<java.lang.Class> getAllFromForThisTo(java.lang.Class to)
getAllFromForThisTo in interface WrapAbilitiespublic java.util.List<java.lang.Class> getAllToForThisFrom(java.lang.Class from)
getAllToForThisFrom in interface WrapAbilitiespublic java.util.List<WrapAbility> getAllWrapAbilitys()
WrapAbilities
getAllWrapAbilitys in interface WrapAbilitiespublic static void main(java.lang.String[] s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||