
com.xellitix.commons.semver.metadata.NonEmptyIdentifierValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of semver Show documentation
Show all versions of semver Show documentation
Semantic Versioning Models and Utilities
The newest version!
package com.xellitix.commons.semver.metadata;
import com.google.inject.Singleton;
/**
* {@link IdentifierValidator} that validates that the {@link Identifier} value is non-empty.
*
*
* Semantic versioning rule:
* Identifiers MUST NOT be empty.
*
*
* @author Grayson Kuhns
*/
@Singleton
public class NonEmptyIdentifierValidator implements IdentifierValidator {
/**
* Checks if an {@link Identifier} is valid.
*
* @param identifier The {@link Identifier}.
* @return True if the {@link Identifier} is valid.
*/
@Override
public boolean isValid(final Identifier identifier) {
return !identifier.getValue().isEmpty();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy