public void putNumber(final String key, final Number value) { this.put(key, Either3.<String, Number, Boolean>forSecond(value)); }
public void putString(final String key, final String value) { this.put(key, Either3.<String, Number, Boolean>forFirst(value)); }
public DocumentFormattingParamsDto(org.eclipse.lsp4j.DocumentFormattingParams o) { if (o.getOptions() == null) { setOptions((org.eclipse.lsp4j.FormattingOptions)null); } else { org.eclipse.lsp4j.FormattingOptions optionsVal= new org.eclipse.lsp4j.FormattingOptions(); for (Entry<String, org.eclipse.lsp4j.jsonrpc.messages.Either3<java.lang.String, java.lang.Number, java.lang.Boolean>> optionsValX : o.getOptions().entrySet()) { org.eclipse.lsp4j.jsonrpc.messages.Either3<java.lang.String, java.lang.Number, java.lang.Boolean> optionsValY; if (optionsValX.getValue().isFirst()) { java.lang.String optionsValYe = (java.lang.String)makeDto(optionsValX.getValue().getFirst());; optionsValY= Either3.forFirst(optionsValYe); } else if (optionsValX.getValue().isSecond()) { java.lang.Number optionsValYe = (java.lang.Number)makeDto(optionsValX.getValue().getSecond());; optionsValY= Either3.forSecond(optionsValYe); } else { java.lang.Boolean optionsValYe = (java.lang.Boolean)makeDto(optionsValX.getValue().getThird());; optionsValY= Either3.forThird(optionsValYe); } optionsVal.put(optionsValX.getKey(), optionsValY); } setOptions((org.eclipse.lsp4j.FormattingOptions)optionsVal); } if (o.getTextDocument() == null) { setTextDocument((org.eclipse.lsp4j.TextDocumentIdentifier)null); } else { org.eclipse.lsp4j.TextDocumentIdentifier textDocumentVal = new TextDocumentIdentifierDto(o.getTextDocument()); setTextDocument((org.eclipse.lsp4j.TextDocumentIdentifier)textDocumentVal); } }
if (EitherUtil.matches(jsonoptionsValoe.getValue(), new JsonDecision[] { JsonDecision.STRING })) { java.lang.String jsonoptionsValoXe = jsonoptionsValoe.getValue().getAsString();; jsonoptionsValoX= Either3.forFirst(jsonoptionsValoXe); } else if (EitherUtil.matches(jsonoptionsValoe.getValue(), new JsonDecision[] { JsonDecision.NUMBER })) { java.lang.Number jsonoptionsValoXe = (Number)jsonoptionsValoe.getValue().getAsDouble();; jsonoptionsValoX= Either3.forSecond(jsonoptionsValoXe); } else { java.lang.Boolean jsonoptionsValoXe = jsonoptionsValoe.getValue().getAsBoolean(); jsonoptionsValoX= Either3.forThird(jsonoptionsValoXe);
public String getString(final String key) { Either3<String, Number, Boolean> _get = this.get(key); String _first = null; if (_get!=null) { _first=_get.getFirst(); } return _first; }
public Boolean getBoolean(final String key) { Either3<String, Number, Boolean> _get = this.get(key); Boolean _third = null; if (_get!=null) { _third=_get.getThird(); } return _third; }
public Number getNumber(final String key) { Either3<String, Number, Boolean> _get = this.get(key); Number _second = null; if (_get!=null) { _second=_get.getSecond(); } return _second; }
public static <T1, T2, T3> Either3<T1, T2, T3> forFirst(@NonNull T1 first) { return new Either3<T1, T2, T3>(first, null); }
public void putBoolean(final String key, final Boolean value) { this.put(key, Either3.<String, Number, Boolean>forThird(value)); }
for (Entry<String, org.eclipse.lsp4j.jsonrpc.messages.Either3<java.lang.String, java.lang.Number, java.lang.Boolean>> optionsValX : o.getOptions().entrySet()) { org.eclipse.lsp4j.jsonrpc.messages.Either3<java.lang.String, java.lang.Number, java.lang.Boolean> optionsValY; if (optionsValX.getValue().isFirst()) { java.lang.String optionsValYe = (java.lang.String)makeDto(optionsValX.getValue().getFirst());; optionsValY= Either3.forFirst(optionsValYe); } else if (optionsValX.getValue().isSecond()) { java.lang.Number optionsValYe = (java.lang.Number)makeDto(optionsValX.getValue().getSecond());; optionsValY= Either3.forSecond(optionsValYe); } else { java.lang.Boolean optionsValYe = (java.lang.Boolean)makeDto(optionsValX.getValue().getThird());; optionsValY= Either3.forThird(optionsValYe);
@Override public String toString() { StringBuilder builder = new StringBuilder("Either3 [").append(System.lineSeparator()); builder.append(" first = ").append(getFirst()).append(System.lineSeparator()); builder.append(" second = ").append(getSecond()).append(System.lineSeparator()); builder.append(" third = ").append(getThird()).append(System.lineSeparator()); return builder.append("]").toString(); }
if (EitherUtil.matches(jsonoptionsValoe.getValue(), new JsonDecision[] { JsonDecision.STRING })) { java.lang.String jsonoptionsValoXe = jsonoptionsValoe.getValue().getAsString();; jsonoptionsValoX= Either3.forFirst(jsonoptionsValoXe); } else if (EitherUtil.matches(jsonoptionsValoe.getValue(), new JsonDecision[] { JsonDecision.NUMBER })) { java.lang.Number jsonoptionsValoXe = (Number)jsonoptionsValoe.getValue().getAsDouble();; jsonoptionsValoX= Either3.forSecond(jsonoptionsValoXe); } else { java.lang.Boolean jsonoptionsValoXe = jsonoptionsValoe.getValue().getAsBoolean(); jsonoptionsValoX= Either3.forThird(jsonoptionsValoXe);
public String getString(final String key) { Either3<String, Number, Boolean> _get = this.get(key); String _first = null; if (_get!=null) { _first=_get.getFirst(); } return _first; }
public Boolean getBoolean(final String key) { Either3<String, Number, Boolean> _get = this.get(key); Boolean _third = null; if (_get!=null) { _third=_get.getThird(); } return _third; }
public Number getNumber(final String key) { Either3<String, Number, Boolean> _get = this.get(key); Number _second = null; if (_get!=null) { _second=_get.getSecond(); } return _second; }
public static <T1, T2, T3> Either3<T1, T2, T3> forLeft3(@NonNull T1 first) { return new Either3<T1, T2, T3>(first, null); }
public void putBoolean(final String key, final Boolean value) { this.put(key, Either3.<String, Number, Boolean>forThird(value)); }
final Either3<String, Number, Boolean> it = _value; boolean _matched = false; boolean _isFirst = it.isFirst(); if (_isFirst) { _matched=true; _switchResult = it.getFirst(); boolean _isSecond = it.isSecond(); if (_isSecond) { _matched=true; _switchResult = it.getSecond(); boolean _isThird = it.isThird(); if (_isThird) { _matched=true; _switchResult = it.getThird();