@Override public String getString() { List<PragmaType> v = getValue(); String r = ""; for (PragmaType pragma : v) { r += (r.length() == 0 ? "" : ",") + pragma.getString(); } return r; }
@Override public void setString(String s) throws InvalidHeaderException { if (s.length() != 0) { if (s.endsWith(";")) { s = s.substring(0, s.length() - 1); } String[] list = s.split("\\s*;\\s*"); List<PragmaType> value = new ArrayList<PragmaType>(); for (String pragma : list) { value.add(PragmaType.valueOf(pragma)); } return; } throw new InvalidHeaderException("Invalid Pragma header value: " + s); }