Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1033958 // GPolymorphicOperator - GOperator with multiple definitions

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5159L/29K).

1  
persistable sclass GPolymorphicOperator<T> extends GAbstractOperator<T> {
2  
  settable new L<GOperator<T>> definitions;
3  
4  
  *(S *name, GOperator<T>... definitions) {
5  
    this.definitions = asList(definitions);
6  
  }
7  
  
8  
  toString {
9  
    ret name + " [polymorphic operator]";
10  
  }
11  
  
12  
  S toStringWithDefinitions() {
13  
    ret name + " - polymorphic operator with " + n2(definitions, "definition") + ":\n"
14  
      + lines_rtrim(indentAll(definitions));
15  
  }
16  
}

Author comment

Began life as a copy of #1033956

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033958
Snippet name: GPolymorphicOperator - GOperator with multiple definitions
Eternal ID of this version: #1033958/5
Text MD5: 1c64d6329a815797c221e1cbf9579f73
Transpilation MD5: d8cacd395750ebbc31bf63e388c7f688
Author: stefan
Category: javax / scripting
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-14 23:59:45
Source code size: 460 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 141 / 239
Version history: 4 change(s)
Referenced in: [show references]