]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.utils/src/org/simantics/utils/strings/StringInputValidator.java
Prevent NPEs in ViewUtils layout loading code
[simantics/platform.git] / bundles / org.simantics.utils / src / org / simantics / utils / strings / StringInputValidator.java
1 package org.simantics.utils.strings;
2
3 import java.util.Collection;
4 import java.util.Collections;
5
6 /**
7  * Checks the validity of input strings and returns
8  * possible problems in the input.
9  */
10 public interface StringInputValidator {
11
12         Collection<StringInputProblem> validate(String input);
13         
14         public static StringInputValidator PASS = new StringInputValidator() {
15                 
16                 @Override
17                 public Collection<StringInputProblem> validate(String input) {
18                         return Collections.emptyList();
19                 }
20                 
21         };
22         
23 }