001package gudusoft.gsqlparser.slpc.adapter;
002
003import java.util.ArrayList;
004import java.util.Collections;
005import java.util.List;
006
007/** Machine-readable ledger for every non-equivalent legacy/SLPC decision. */
008public final class IntentionalDiffLedger {
009    public enum Category {
010        EXPECTED_SEMANTIC_CORRECTION,
011        EXPECTED_PRESENTATION_DIFFERENCE,
012        EXPECTED_IDENTITY_ROTATION,
013        KNOWN_UNSUPPORTED_WITH_LOSS,
014        REGRESSION
015    }
016
017    public static final class Entry {
018        private final Category category; private final String owner, code, explanation;
019        Entry(Category category, String owner, String code, String explanation) {
020            this.category = category; this.owner = owner; this.code = code; this.explanation = explanation;
021        }
022        public Category category() { return category; }
023        public String owner() { return owner; }
024        public String code() { return code; }
025        public String explanation() { return explanation; }
026    }
027
028    private final List<Entry> entries;
029    IntentionalDiffLedger(List<Entry> entries) { this.entries = Collections.unmodifiableList(new ArrayList<Entry>(entries)); }
030    public List<Entry> entries() { return entries; }
031    public boolean hasRegression() { for (Entry entry : entries) if (entry.category == Category.REGRESSION) return true; return false; }
032}