@Override public String getString(Object value) { String str = null; if (value != null) { str = AttributeUtils.printArray(value); } return str; } }
@Override public String getTextFromValue(Object value) { if (value == null) { return null; } return AttributeUtils.printArray(value); }
@Override public boolean evaluate(Graph graph, Element element) { if (pattern == null) { return true; } Object val = element.getAttribute(column, graph.getView()); if (val != null) { String valString = column.isArray() ? AttributeUtils.printArray(val) : val.toString(); if (useRegex) { return regex.matcher(valString).matches(); } else { return pattern.equals(valString); } } return false; }
/** * Returns the string representation of the given value. * * @param value value * @param timeFormat time format * @param timeZone time zone * @return string representation */ public static String print(Object value, TimeFormat timeFormat, DateTimeZone timeZone) { if (value == null) { return "null"; } if (value instanceof TimeSet) { return ((TimeSet) value).toString(timeFormat, timeZone); } if (value instanceof TimeMap) { return ((TimeMap) value).toString(timeFormat, timeZone); } if (value.getClass().isArray()) { return printArray(value); } return value.toString(); }
/** * Returns the string representation of the given value. * * @param value value * @param timeFormat time format * @param timeZone time zone * @return string representation */ public static String print(Object value, TimeFormat timeFormat, DateTimeZone timeZone) { if (value == null) { return "null"; } if (value instanceof TimeSet) { return ((TimeSet) value).toString(timeFormat, timeZone); } if (value instanceof TimeMap) { return ((TimeMap) value).toString(timeFormat, timeZone); } if (value.getClass().isArray()) { return printArray(value); } return value.toString(); }
private String buildText(Graph graph, Element element, Column column) { Object val = element.getAttribute(column, graph.getView()); if (val == null) { return ""; } if (column.isArray()) { return AttributeUtils.printArray(val); } else { return val.toString(); } }
String displayName = value == null ? "null" : value.getClass().isArray() ? AttributeUtils.printArray(value) : value.toString(); int count = function.getPartition().count(value); float percentage = function.getPartition().percentage(value) / 100f;
@Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { TimeFormat timeFormat = graphModelProvider.getGraphModel().getTimeFormat(); DateTimeZone timeZone = graphModelProvider.getGraphModel().getTimeZone(); String valueStr; if (value == null) { valueStr = ""; } else if (isTimestampSetType) { valueStr = ((TimestampSet) value).toString(timeFormat, timeZone); } else if (isTimestampMapType) { valueStr = ((TimestampMap) value).toString(timeFormat, timeZone); } else if (isIntervalSetType) { valueStr = ((IntervalSet) value).toString(timeFormat, timeZone); } else if (isIntervalMapType) { valueStr = ((IntervalMap) value).toString(timeFormat, timeZone); } else if (isArrayType) { valueStr = AttributeUtils.printArray(value); } else { valueStr = AttributeUtils.print(value, timeFormat, timeZone); } textField.setBorder(originalBorder); textField.setEditable(true); textField.setText(valueStr); return textField; } }