@Contract(value = "null -> null", pure=true)
  public static <T> T getLastElement(T @Nullable [] array) {
    return array != null && array.length > 0 ? array[array.length - 1] : null;
  }
@Contract(value = "null -> null", pure=true)
  public static <T> T getLastElement(T @Nullable [] array)