MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / Channels

Method Channels

src/main/java/fieldbox/boxes/plugins/Channels.java:115–137  ·  view source on GitHub ↗
(Box root)

Source from the content-addressed store, hash-verified

113
114 static public final Dict.Prop<FunctionOfBoxValued<Infoer>> info = new Dict.Prop<Info>("info").type().toCanon().doc("returns an object that lets you set sidecar properties of properties, such as max, min, accessors etc. A property with a sidecar Dict is a 'channel'");
115
116 public Channels(Box root)
117 {
118 properties.put(info, x -> new Infoer(x));
119 properties.put(channels, x -> {
120
121 ArrayList<String> a = new ArrayList<>();
122
123 // any property of this box that there's a channel info for anywhere above it
124 Map<Dict.Prop, Object> m = x.properties.getMap();
125 m.entrySet().forEach(e -> {
126 Object i = x.asMap_get("_" + e.getKey()
127 .getName() + "_info");
128 if (i instanceof Info) {
129 a.add(e.getKey()
130 .getName());
131 }
132 });
133
134
135 return a;
136
137 });
138 }
139
140

Callers

nothing calls this directly

Calls 6

getMapMethod · 0.80
asMap_getMethod · 0.65
putMethod · 0.45
forEachMethod · 0.45
getNameMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected