com.freenow.apis.phrase.domainobject.locale.PhraseProject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phrase-java-client Show documentation
Show all versions of phrase-java-client Show documentation
This projects contains of services to handle the translations from [PhraseApp API
v2](http://docs.phraseapp.com/api/v2/). It's supposed to expose Phrase translations as POJO or as File within the java world.
package com.freenow.apis.phrase.domainobject.locale;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class PhraseProject
{
private String projectId;
private List branches;
private PhraseProject(String projectId, List branches)
{
this.projectId = projectId;
this.branches = branches;
}
public String getProjectId()
{
return projectId;
}
public List getBranches()
{
return branches;
}
public static PhraseProject.Builder newBuilder()
{
return new PhraseProject.Builder();
}
public static class Builder
{
private String projectId;
private List branches = new ArrayList<>();
public PhraseProject.Builder withProjectId(String projectId)
{
this.projectId = projectId;
return this;
}
public PhraseProject.Builder withBranches(List branches)
{
this.branches = branches;
return this;
}
public PhraseProject.Builder addBranch(final PhraseBranch branch)
{
branches.add(branch);
return this;
}
public PhraseProject build()
{
return new PhraseProject(projectId, branches);
}
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
PhraseProject that = (PhraseProject) o;
return Objects.equals(projectId, that.projectId) &&
Objects.equals(branches, that.branches);
}
@Override
public int hashCode()
{
return Objects.hash(projectId, branches);
}
@Override
public String toString()
{
return "PhraseProject{" +
"projectId='" + projectId + '\'' +
", branches=" + branches +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy