@SuppressWarnings("unchecked") public <T> T getTyped(DataType<T> type, String adname) { String s = get(adname); if (s == null) return null; Type t = getType(adname); if (t != type.type()) throw new IllegalArgumentException( "For key " + adname + ", expected " + type.type() + " but had a " + t + ". Value is " + s); return (T) convert(t, s); }
@SuppressWarnings("unchecked") public <T> T getTyped(DataType<T> type, String adname) { String s = get(adname); if (s == null) return null; Type t = getType(adname); if ( t != type.type()) throw new IllegalArgumentException("For key " + adname + ", expected " + type.type() + " but had a " + t +". Value is " + s); return (T) convert(t, s); }
@SuppressWarnings("unchecked") public <T> T getTyped(DataType<T> type, String adname) { String s = get(adname); if (s == null) return null; Type t = getType(adname); if (t != type.type()) throw new IllegalArgumentException( "For key " + adname + ", expected " + type.type() + " but had a " + t + ". Value is " + s); return (T) convert(t, s); }
@SuppressWarnings("unchecked") public <T> T getTyped(DataType<T> type, String adname) { String s = get(adname); if (s == null) return null; Type t = getType(adname); if (t != type.type()) throw new IllegalArgumentException( "For key " + adname + ", expected " + type.type() + " but had a " + t + ". Value is " + s); return (T) convert(t, s); }
@SuppressWarnings("unchecked") public <T> T getTyped(DataType<T> type, String adname) { String s = get(adname); if (s == null) return null; Type t = getType(adname); if ( t != type.type()) throw new IllegalArgumentException("For key " + adname + ", expected " + type.type() + " but had a " + t +". Value is " + s); return (T) convert(t, s); }
@SuppressWarnings("unchecked") public <T> T getTyped(DataType<T> type, String adname) { String s = get(adname); if (s == null) return null; Type t = getType(adname); if (t != type.type()) throw new IllegalArgumentException( "For key " + adname + ", expected " + type.type() + " but had a " + t + ". Value is " + s); return (T) convert(t, s); }