io.lindstrom.mpd.data.Profiles Maven / Gradle / Ivy
package io.lindstrom.mpd.data;
import io.lindstrom.mpd.support.Utils;
import java.util.List;
import java.util.Objects;
public class Profiles {
private final List profiles;
private final List interoperabilityPointsAndExtensions;
public Profiles(List profiles, List interoperabilityPointsAndExtensions) {
this.profiles = profiles;
this.interoperabilityPointsAndExtensions = interoperabilityPointsAndExtensions;
}
Profiles() {
this.profiles = null;
this.interoperabilityPointsAndExtensions = null;
}
public List getProfiles() {
return Utils.unmodifiableList(profiles);
}
public List getInteroperabilityPointsAndExtensions() {
return Utils.unmodifiableList(interoperabilityPointsAndExtensions);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Profiles profiles1 = (Profiles) o;
return Objects.equals(profiles, profiles1.profiles) &&
Objects.equals(interoperabilityPointsAndExtensions, profiles1.interoperabilityPointsAndExtensions);
}
@Override
public int hashCode() {
return Objects.hash(profiles, interoperabilityPointsAndExtensions);
}
@Override
public String toString() {
return "Profiles{" +
"profiles=" + profiles +
", interoperabilityPointsAndExtensions=" + interoperabilityPointsAndExtensions +
'}';
}
public Builder buildUpon() {
return new Builder()
.withProfiles(profiles)
.withInteroperabilityPointsAndExtensions(interoperabilityPointsAndExtensions);
}
public static class Builder {
private List profiles;
private List interoperabilityPointsAndExtensions;
public Builder withProfiles(List profiles) {
this.profiles = profiles;
return this;
}
public Builder withInteroperabilityPointsAndExtensions(List interoperabilityPointsAndExtensions) {
this.interoperabilityPointsAndExtensions = interoperabilityPointsAndExtensions;
return this;
}
public Profiles build() {
return new Profiles(profiles, interoperabilityPointsAndExtensions);
}
}
}