001package de.monochromata.anaphors.perspectivation.strategy;
002
003public class PerspectivationConfiguration {
004
005    public final boolean underspecifyRelatedExpression;
006    public final boolean underspecifyAnaphor;
007
008    /**
009     * Used in contract testing.
010     */
011    @SuppressWarnings("unused")
012    protected PerspectivationConfiguration() {
013        underspecifyRelatedExpression = false;
014        underspecifyAnaphor = false;
015    }
016
017    public PerspectivationConfiguration(final boolean underspecifyRelatedExpression,
018            final boolean underspecifyAnaphor) {
019        this.underspecifyRelatedExpression = underspecifyRelatedExpression;
020        this.underspecifyAnaphor = underspecifyAnaphor;
021    }
022
023    @Override
024    public int hashCode() {
025        final int prime = 31;
026        int result = 1;
027        result = prime * result + (underspecifyAnaphor ? 1231 : 1237);
028        result = prime * result + (underspecifyRelatedExpression ? 1231 : 1237);
029        return result;
030    }
031
032    @Override
033    public boolean equals(final Object obj) {
034        if (this == obj) {
035            return true;
036        }
037        if (obj == null) {
038            return false;
039        }
040        if (getClass() != obj.getClass()) {
041            return false;
042        }
043        final PerspectivationConfiguration other = (PerspectivationConfiguration) obj;
044        if (underspecifyAnaphor != other.underspecifyAnaphor) {
045            return false;
046        }
047        if (underspecifyRelatedExpression != other.underspecifyRelatedExpression) {
048            return false;
049        }
050        return true;
051    }
052
053    @Override
054    public String toString() {
055        return "(" + underspecifyRelatedExpression + ", " + underspecifyAnaphor + ")";
056    }
057
058}