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

11
LINES

< > BotCompany Repo | #1033104 // WithSideValue - pair of a main value (.get() or !) and a side value (.sideValue()), both of arbitrary type

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

Libraryless. Click here for Pure Java version (4165L/24K).

1  
sclass WithSideValue<A, B> extends Var<B> implements IWithSideValue<A, B> {
2  
  A sideValue;
3  
  
4  
  *() {}
5  
  *(A *sideValue, B value) { super(value); }
6  
  *(B value) { super(value); }
7  
  
8  
  public A sideValue() { ret sideValue; }
9  
  
10  
  toString { ret prependSquareBracketed(sideValue) + super.toString(); }
11  
}

Author comment

Began life as a copy of #1026686

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033104
Snippet name: WithSideValue - pair of a main value (.get() or !) and a side value (.sideValue()), both of arbitrary type
Eternal ID of this version: #1033104/5
Text MD5: aae7138564784d8be41ee4aba1417e92
Transpilation MD5: b326ed73829820bee9face8930469703
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-14 21:21:44
Source code size: 311 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 164 / 294
Version history: 4 change(s)
Referenced in: [show references]