- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {FileOutputStream f =
File file;new FileOutputStream(file)
String name;new FileOutputStream(name)
File file;new FileOutputStream(file, true)
- Smart code suggestions by Codota
}
@Close public void close() { if (stringPatternConnections != null) { for (final StringPatternConnection connection : stringPatternConnections) { connection.close(); } stringPatternConnections = null; } }
public Object[] doMatching(final Object value) { final Object[] result = new Object[stringPatternConnections.length]; final String stringValue = ConvertToStringTransformer.transformValue(value); for (int i = 0; i < result.length; i++) { final boolean matches = stringPatternConnections[i].matches(stringValue); if (_outputType == MatchOutputType.TRUE_FALSE) { result[i] = matches; } else if (_outputType == MatchOutputType.INPUT_OR_NULL) { if (matches) { result[i] = stringValue; } else { result[i] = null; } } } return result; }
@Close public void close() { if (stringPatternConnections != null) { for (final StringPatternConnection stringPatternConnection : stringPatternConnections) { stringPatternConnection.close(); } stringPatternConnections = null; } }
@Override public ValidationCategory categorize(final InputRow inputRow) { final String value = inputRow.getValue(column); if (value != null) { int matches = 0; for (final StringPatternConnection connection : stringPatternConnections) { if (connection.matches(value)) { matches++; if (matchCriteria == MatchFilterCriteria.ANY) { return ValidationCategory.VALID; } } } if (matchCriteria == MatchFilterCriteria.ALL) { return ValidationCategory.valueOf(matches == stringPatterns.length); } } return ValidationCategory.INVALID; }