String value wrapper: API

Part of Zkejid's Constructor Framework. Serves as a wrapper around string values provided through any container: command line property, configuration property, etc. Includes semantics of "empty value" and "omitted value".

License

License

GroupId

GroupId

com.zkejid.constructor
ArtifactId

ArtifactId

string-value-api
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

String value wrapper: API
Part of Zkejid's Constructor Framework. Serves as a wrapper around string values provided through any container: command line property, configuration property, etc. Includes semantics of "empty value" and "omitted value".
Project URL

Project URL

https://github.com/zkejidsconstructor/string-value/tree/master/string-value-api

Download string-value-api

How to add to project

<!-- https://jarcasting.com/artifacts/com.zkejid.constructor/string-value-api/ -->
<dependency>
    <groupId>com.zkejid.constructor</groupId>
    <artifactId>string-value-api</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.zkejid.constructor/string-value-api/
implementation 'com.zkejid.constructor:string-value-api:1.0.0'
// https://jarcasting.com/artifacts/com.zkejid.constructor/string-value-api/
implementation ("com.zkejid.constructor:string-value-api:1.0.0")
'com.zkejid.constructor:string-value-api:jar:1.0.0'
<dependency org="com.zkejid.constructor" name="string-value-api" rev="1.0.0">
  <artifact name="string-value-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.zkejid.constructor', module='string-value-api', version='1.0.0')
)
libraryDependencies += "com.zkejid.constructor" % "string-value-api" % "1.0.0"
[com.zkejid.constructor/string-value-api "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

String Value module

Overview

Part of Zkejid's Constructor Framework. Serves as a wrapper around string values provided through any container: command line property, configuration property, etc. Includes semantics of "empty value" and "omitted value". Sometimes it is hard to say if the value of string parameter is actually an empty string, or the value is unspecified due to any reason. Sometimes both of these situationsshould be processed similarly, bot in other cases actions should be different. This module helps to process the value in strict and obvious way.

Usage

API

To use the API as the publisher of the value you should request StringValueFactory.class interface in your ConstructorPart implementation:

  @Override
  public Set<Class<?>> getInterfacesNecessary() {
    return Set.of(StringValueFactory.class);
  }

For a given value to publish you should call make(String, InputValueType) method of the factory. String value contains the value to pass, InputValueType contains type of raw value obtained from the source.

To use the API as the receiver of value you may just use StringValue object.

Constructor Module

String Value is the module of Constructor Framework. You can simply place artifacts of this module on the path of application to use its API.

Versioning

Artifact versions of the String Value Module follow the Semantic Versioning 2.0.0 specification.

License

The module is provided under MIT License Copyright (c) 2020 Zkejid.

Versions

Version
1.0.0