Here you can find the source of getStringFirstResult(List> llo, String reason)
Parameter | Description |
---|---|
llo | the llo |
reason | the reason |
public static String getStringFirstResult(List<List<Object>> llo, String reason)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**// ww w . j ava 2s. c o m * Gets the string first result. * * @param llo the llo * @param reason the reason * @return the string first result */ public static String getStringFirstResult(List<List<Object>> llo, String reason) { Object o = getNthResult(llo, 0, reason); if (!(o instanceof String)) throw new RuntimeException("Result not String, " + reason); return (String) getNthResult(llo, 0, reason); } /** * Gets the nth result. * * @param llo the llo * @param n the n * @param reason the reason * @return the nth result */ public static Object getNthResult(List<List<Object>> llo, int n, String reason) { if (llo.size() < 1) throw new RuntimeException("Insufficient row results, " + reason); if (llo.get(0).size() < n + 1) throw new RuntimeException("Insufficient column results, " + reason); return llo.get(0).get(n); } }