All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.artipie.nuget.metadata.PackageId Maven / Gradle / Ivy

There is a newer version: 1.5.5
Show newest version
/*
 * The MIT License (MIT) Copyright (c) 2020-2023 artipie.com
 * https://github.com/artipie/artipie/blob/master/LICENSE.txt
 */
package com.artipie.nuget.metadata;

import java.util.Locale;

/**
 * Package id nuspec field.
 * See .NET's System.String.ToLowerInvariant().
 * @since 0.6
 */
public final class PackageId implements NuspecField {

    /**
     * Raw value of package id tag.
     */
    private final String val;

    /**
     * Ctor.
     * @param val Raw value of package id tag
     */
    public PackageId(final String val) {
        this.val = val;
    }

    @Override
    public String raw() {
        return this.val;
    }

    @Override
    public String normalized() {
        return this.val.toLowerCase(Locale.getDefault());
    }

    @Override
    public String toString() {
        return this.val;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy