com.nodelab.interest | ![]() |
com.nodelab.0.10187
Instance of Type
Inheriting from Calculator
This calculator displays values from the yield at 30, 60, 90, 120, 150, 180, 270, 360, 540, 720, 1080, 1400, 1800, 2200, 2600, 3000 and 3600 days, 30/360 count.
Type data | Value |
org.uninode.Type.displayPattern | a {att:org.uninode.Node.type} |
org.uninode.Resource.resourceType | |
org.uninode.Resource.label | |
org.uninode.Resource.resourceOf | List{} |
org.uninode.Listable.resources | Reference[org.uninode.Listable.resources] of com.nodelab.interest.YieldPoints |
Attribute summary | Defined in | Uninode® Id | Properties | Default | |
Reference[org.uninode.Listable.resources] | resources | Listable | org.uninode.0.2001 | type | |
String | toString This is the display string. | Node | org.uninode.0.102 | ||
Type | type The type of an object determines the behaviour and attributes of the object. | Node | org.uninode.0.101 | ||
String | uri | Node | org.uninode.0.103 | ||
String | label | Resource | org.uninode.0.2041 | type | |
List[Type] | resourceOf | Resource | org.uninode.0.2042 | type | |
Signature | resourceType This defines the type of resource. It can be 'view', 'adapter' or 'action' | Resource | org.uninode.0.2043 | type |
Script summary |
com.nodelab.0.10388/* instance Collection[Int] dayList; instance Collection[Real] modifiers; constructor() { View:(); instance dayList = #(30, 60, 90, 120, 150, 180, 270, 360, 540, 720, 1080, 1400, 1800, 2200, 2600, 3000, 3600); instance modifiers = #(0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.17, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20); } class Boolean isResourceOf(Listable node, Symbol aspect) { if (aspect == #views) return true; false; } class String resourceLabel() "Name of resource" { "yield points"; } introspect Collection[Class] requiredConditions() { #(ConditionHistory); } Void designView(WidgetWorkspace ws) { Yield yield = Yield{partAt(0).source}; if (yield == null' '!(yield.class.subclassOf(Yield))) { Producer.report("First part must be a yield"); return null; } ws.addHeader(new Place(0, 0).setPrefSize(0, 20), this); Array2D[Object] array = new Array2D(Number, 4, instance dayList.size); 0 .to(instance dayList.size - 1, trace Void(Int i) { Int days = instance dayList.at(i); external cond_maturity = days / 360; Real value = yield.aspectReal(#value); Real mod = instance modifiers.at(i); array.set(0, i, days); array.set(1, i, value); array.set(2, i, mod); array.set(3, i, value + mod); }); ws.addTable(new Place(0, 1).setWeight(1.0, 1.0, #both).setPadding(20, 4), array, #("Days", "Yield", "Mod", "Total"), true); ws.addGigInfo(new Place(0, 2).setPrefSize(0, 16).setFill(#horizontal), gig()); } */ |