hydra.langs.graphql.syntax.InlineFragment Maven / Gradle / Ivy
package hydra.langs.graphql.syntax;
import java.io.Serializable;
public class InlineFragment implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/graphql/syntax.InlineFragment");
public final java.util.Optional typeCondition;
public final java.util.Optional directives;
public final hydra.langs.graphql.syntax.SelectionSet selectionSet;
public InlineFragment (java.util.Optional typeCondition, java.util.Optional directives, hydra.langs.graphql.syntax.SelectionSet selectionSet) {
this.typeCondition = typeCondition;
this.directives = directives;
this.selectionSet = selectionSet;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof InlineFragment)) {
return false;
}
InlineFragment o = (InlineFragment) (other);
return typeCondition.equals(o.typeCondition) && directives.equals(o.directives) && selectionSet.equals(o.selectionSet);
}
@Override
public int hashCode() {
return 2 * typeCondition.hashCode() + 3 * directives.hashCode() + 5 * selectionSet.hashCode();
}
public InlineFragment withTypeCondition(java.util.Optional typeCondition) {
return new InlineFragment(typeCondition, directives, selectionSet);
}
public InlineFragment withDirectives(java.util.Optional directives) {
return new InlineFragment(typeCondition, directives, selectionSet);
}
public InlineFragment withSelectionSet(hydra.langs.graphql.syntax.SelectionSet selectionSet) {
return new InlineFragment(typeCondition, directives, selectionSet);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy