- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 41 of file StringList.java.
◆ getField()
FieldIt org.turro.fieldit.StringList.getField |
( |
| ) |
|
◆ getPossibleValues()
Set<String> org.turro.fieldit.StringList.getPossibleValues |
( |
| ) |
|
Definition at line 64 of file StringList.java.
65 Set<String>
set =
new HashSet<>();
67 try (BufferedReader br =
new BufferedReader(
new FileReader(
getValueFile(), Charset.forName(ElephantContext.getEncoding())))) {
68 set = br.lines().filter(line -> !Strings.isBlank(line)).collect(Collectors.toSet());
69 }
catch (IOException ex) {
70 Logger.getLogger(StringList.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ getValue()
String org.turro.fieldit.StringList.getValue |
( |
| ) |
|
◆ getValueFile() [1/2]
File org.turro.fieldit.StringList.getValueFile |
( |
| ) |
|
◆ getValueFile() [2/2]
static File org.turro.fieldit.StringList.getValueFile |
( |
FieldIt |
field | ) |
|
|
static |
Definition at line 90 of file StringList.java.
91 File root =
new File(ElephantContext.getRealPath(FIELDS_ROOT));
92 if(!root.exists()) root.mkdir();
94 ElephantContext.getRealPath(FIELDS_ROOT +
"/" + Strings.toFile(field.
getName())) +
◆ setField()
void org.turro.fieldit.StringList.setField |
( |
FieldIt |
field | ) |
|
◆ setPossibleValues()
void org.turro.fieldit.StringList.setPossibleValues |
( |
Set< String > |
values | ) |
|
Definition at line 76 of file StringList.java.
77 try (PrintWriter pw =
new PrintWriter(
new FileWriter(
getValueFile(), Charset.forName(ElephantContext.getEncoding())))) {
78 values.forEach((line) -> {
79 if(!Strings.isBlank(line)) pw.println(line);
81 }
catch (IOException ex) {
82 Logger.getLogger(StringList.class.getName()).log(Level.SEVERE,
null, ex);
◆ setValue()
void org.turro.fieldit.StringList.setValue |
( |
String |
value | ) |
|
The documentation for this class was generated from the following file: