• 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

20.0
cli/src/main/java/com/devonfw/tools/ide/variable/VariableDefinitionVersion.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
import com.devonfw.tools.ide.version.VersionIdentifier;
7

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

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

20
    super(name);
×
21
  }
×
22

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

31
    super(name, legacyName);
4✔
32
  }
1✔
33

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

44
    super(name, legacyName, defaultValueFactory);
×
45
  }
×
46

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

58
    super(name, legacyName, defaultValueFactory, forceDefaultValue);
×
59
  }
×
60

61
  @Override
62
  public Class<VersionIdentifier> getValueType() {
63

64
    return VersionIdentifier.class;
×
65
  }
66

67
  @Override
68
  public VersionIdentifier fromString(String value, IdeContext context) {
69

70
    return VersionIdentifier.of(value);
×
71
  }
72
}
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