Java Type Coalesce coalesce(T o0, T o1)

Here you can find the source of coalesce(T o0, T o1)

Description

coalesce

License

Open Source License

Declaration

public static <T> T coalesce(T o0, T o1) 

Method Source Code

//package com.java2s;
/**/*from   w  w w  .j av a 2s.co  m*/
 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
 *
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.md file.
 */

public class Main {
    public static <T> T coalesce(T o0, T o1) {
        return o0 != null ? o0 : o1;
    }
}

Related

  1. coalesce(String... strings)
  2. coalesce(String... strings)
  3. coalesce(String... vals)
  4. coalesce(String[] values)
  5. coalesce(T a, T b)
  6. coalesce(T preferred, T alternative)
  7. coalesce(T value, T whenNullValue)
  8. coalesce(T... args)
  9. coalesce(T... objects)