• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 9907372175

12 Jul 2024 11:49AM UTC coverage: 61.142% (-0.02%) from 61.162%
9907372175

push

github

hohwille
fixed tests

1997 of 3595 branches covered (55.55%)

Branch coverage included in aggregate %.

5296 of 8333 relevant lines covered (63.55%)

2.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

58.33
cli/src/main/java/com/devonfw/tools/ide/variable/VariableDefinitionString.java
1
package com.devonfw.tools.ide.variable;
2

3
import java.util.function.Function;
4

5
import com.devonfw.tools.ide.context.IdeContext;
6

7
/**
8
 * Implementation of {@link VariableDefinition} for a variable with the {@link #getValueType() value type} {@link String}.
9
 */
10
public class VariableDefinitionString extends AbstractVariableDefinition<String> {
11

12
  /**
13
   * The constructor.
14
   *
15
   * @param name the {@link #getName() variable name}.
16
   */
17
  public VariableDefinitionString(String name) {
18

19
    super(name);
×
20
  }
×
21

22
  /**
23
   * The constructor.
24
   *
25
   * @param name the {@link #getName() variable name}.
26
   * @param legacyName the {@link #getLegacyName() legacy name}.
27
   */
28
  public VariableDefinitionString(String name, String legacyName) {
29

30
    super(name, legacyName);
×
31
  }
×
32

33
  /**
34
   * The constructor.
35
   *
36
   * @param name the {@link #getName() variable name}.
37
   * @param legacyName the {@link #getLegacyName() legacy name}.
38
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
39
   */
40
  public VariableDefinitionString(String name, String legacyName, Function<IdeContext, String> defaultValueFactory) {
41

42
    super(name, legacyName, defaultValueFactory);
5✔
43
  }
1✔
44

45
  /**
46
   * The constructor.
47
   *
48
   * @param name the {@link #getName() variable name}.
49
   * @param legacyName the {@link #getLegacyName() legacy name}.
50
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
51
   * @param forceDefaultValue the {@link #isForceDefaultValue() forceDefaultValue} flag.
52
   */
53
  public VariableDefinitionString(String name, String legacyName, Function<IdeContext, String> defaultValueFactory, boolean forceDefaultValue) {
54

55
    super(name, legacyName, defaultValueFactory, forceDefaultValue);
6✔
56
  }
1✔
57

58
  /**
59
   * The constructor.
60
   *
61
   * @param name the {@link #getName() variable name}.
62
   * @param legacyName the {@link #getLegacyName() legacy name}.
63
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
64
   * @param forceDefaultValue the {@link #isForceDefaultValue() forceDefaultValue} flag.
65
   * @param export the {@link #isExport() value}.
66
   */
67
  public VariableDefinitionString(String name, String legacyName, Function<IdeContext, String> defaultValueFactory, boolean forceDefaultValue, boolean export) {
68

69
    super(name, legacyName, defaultValueFactory, forceDefaultValue, export);
7✔
70
  }
1✔
71

72
  @Override
73
  public Class<String> getValueType() {
74

75
    return String.class;
×
76
  }
77

78
  @Override
79
  public String fromString(String value, IdeContext context) {
80

81
    return value;
2✔
82
  }
83
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc