Supplier () -> x
Consumer x -> ()
BiConsumer x, y -> ()
Callable () -> x throws ex
Runnable () -> ()
Function x -> y
BiFunction x, y -> z
Predicate x -> boolean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Help > Edit Custom Properties... | |
ide.ui.new.file.chooser=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.phl.statemachine; | |
import org.springframework.statemachine.StateMachine; | |
public class StateMachineMermaidGenerator { | |
public static <S, E> String generate(StateMachine<S, E> stateMachine) { | |
System.out.println("Generating mermaid 🧜\n"); | |
StringBuilder mmBuilder = new StringBuilder(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function serializeCSS(cssProperties: CSSProperties | undefined): string { | |
if (!cssProperties) return ''; | |
let cssString = ''; | |
for (const [key, value] of Object.entries(cssProperties)) { | |
cssString += key.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) + ':' + value + ';'; | |
} | |
return cssString; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Reinvent === | |
* @ref [Equality comparisons and sameness](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness) | |
* @ref [JavaScript Equality Table](https://dorey.github.io/JavaScript-Equality-Table/) | |
*/ | |
export const strictEquals = (a, b) => { | |
if (typeof a == 'number' && typeof b == 'number') { | |
if (isNaN(a) && isNaN(b)) { | |
return false; | |
} else if ((Object.is(a, 0) && Object.is(b, -0)) || (Object.is(a, -0) && Object.is(b, 0))) { |