net.nemerosa.ontrack.model.support.SelectableString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.support;
import lombok.Data;
import java.util.Collection;
/**
* Simple implementation of a {@link Selectable} item based on a name only.
*/
@Data
public class SelectableString implements Selectable {
private final boolean selected;
private final String name;
@Override
public String getId() {
return name;
}
public static SelectableString of(String name, Collection names) {
return new SelectableString(
names.contains(name),
name
);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy