@SuppressWarnings("unchecked") public Node representData(Object data) { return representMapping(getTag(data.getClass(), Tag.MAP), (Map<Object, Object>) data, DumperOptions.FlowStyle.AUTO); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { return representSequence(getTag(data.getClass(), Tag.SEQ), (List<Object>) data, DumperOptions.FlowStyle.AUTO); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { Map<Object, Object> value = new LinkedHashMap<Object, Object>(); Set<Object> set = (Set<Object>) data; for (Object key : set) { value.put(key, null); } return representMapping(getTag(data.getClass(), Tag.SET), value, DumperOptions.FlowStyle.AUTO); } }
public Node representData(Object data) { Tag tag = new Tag(data.getClass()); return representScalar(getTag(data.getClass(), tag), ((Enum<?>) data).name()); } }
public Node representData(Object data) { Tag tag; String value; if (data instanceof Byte || data instanceof Short || data instanceof Integer || data instanceof Long || data instanceof BigInteger) { tag = Tag.INT; value = data.toString(); } else { Number number = (Number) data; tag = Tag.FLOAT; if (number.equals(Double.NaN)) { value = ".NaN"; } else if (number.equals(Double.POSITIVE_INFINITY)) { value = ".inf"; } else if (number.equals(Double.NEGATIVE_INFINITY)) { value = "-.inf"; } else { value = number.toString(); } } return representScalar(getTag(data.getClass(), tag), value); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { Iterator<Object> iter = (Iterator<Object>) data; return representSequence(getTag(data.getClass(), Tag.SEQ), new IteratorWrapper(iter), DumperOptions.FlowStyle.AUTO); } }
public Node representData(Object data) { return representScalar(getTag(data.getClass(), new Tag(UUID.class)), data.toString()); } }
return representScalar(getTag(data.getClass(), Tag.TIMESTAMP), buffer.toString(), DumperOptions.ScalarStyle.PLAIN);
@SuppressWarnings("unchecked") public Node representData(Object data) { return representSequence(getTag(data.getClass(), Tag.SEQ), (List<Object>) data, null); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { return representMapping(getTag(data.getClass(), Tag.MAP), (Map<Object, Object>) data, null); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { Map<Object, Object> value = new LinkedHashMap<Object, Object>(); Set<Object> set = (Set<Object>) data; for (Object key : set) { value.put(key, null); } return representMapping(getTag(data.getClass(), Tag.SET), value, null); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { return representMapping(getTag(data.getClass(), Tag.MAP), (Map<Object, Object>) data, DumperOptions.FlowStyle.AUTO); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { Map<Object, Object> value = new LinkedHashMap<Object, Object>(); Set<Object> set = (Set<Object>) data; for (Object key : set) { value.put(key, null); } return representMapping(getTag(data.getClass(), Tag.SET), value, DumperOptions.FlowStyle.AUTO); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { return representSequence(getTag(data.getClass(), Tag.SEQ), (List<Object>) data, null); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { Map<Object, Object> value = new LinkedHashMap<Object, Object>(); Set<Object> set = (Set<Object>) data; for (Object key : set) { value.put(key, null); } return representMapping(getTag(data.getClass(), Tag.SET), value, null); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { return representMapping(getTag(data.getClass(), Tag.MAP), (Map<Object, Object>) data, null); } }
public Node representData(Object data) { Tag tag = new Tag(data.getClass()); return representScalar(getTag(data.getClass(), tag), ((Enum<?>) data).name()); } }
public Node representData(Object data) { Tag tag = new Tag(data.getClass()); return representScalar(getTag(data.getClass(), tag), ((Enum<?>) data).name()); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { Iterator<Object> iter = (Iterator<Object>) data; return representSequence(getTag(data.getClass(), Tag.SEQ), new IteratorWrapper(iter), null); } }
@SuppressWarnings("unchecked") public Node representData(Object data) { Iterator<Object> iter = (Iterator<Object>) data; return representSequence(getTag(data.getClass(), Tag.SEQ), new IteratorWrapper(iter), DumperOptions.FlowStyle.AUTO); } }