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

de.pfabulist.loracle.license.SingleLicense Maven / Gradle / Ivy

Go to download

maven plugin to check the licenses of all dependencies and possible incompatibilities

There is a newer version: 2.0.1
Show newest version
package de.pfabulist.loracle.license;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import javax.annotation.Nullable;

/**
 * Copyright (c) 2006 - 2016, Stephan Pfab
 * SPDX-License-Identifier: BSD-2-Clause
 */

public class SingleLicense implements LicenseID {

    private final String id;

    SingleLicense( String id ) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    @Override
    public String toString() {
        return id;
    }

    @Override
    @SuppressFBWarnings( "NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION" )
    public boolean equals( @Nullable Object o ) {
        if( this == o ) { return true; }
        if( o == null || getClass() != o.getClass() ) { return false; }
        return id.equals( ((SingleLicense) o).id );

    }

    @Override
    public int hashCode() {
        return id.hashCode();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy