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).

sclass WithSideValue<A, B> extends Var<B> implements IWithSideValue<A, B> {
  A sideValue;
  
  *() {}
  *(A *sideValue, B value) { super(value); }
  *(B value) { super(value); }
  
  public A sideValue() { ret sideValue; }
  
  toString { ret prependSquareBracketed(sideValue) + super.toString(); }
}

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: 162 / 290
Version history: 4 change(s)
Referenced in: [show references]