/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

package com.pullenti.unitext.internal.uni;

public class UnitextGenNumStyleEx implements IUnitextGenNumStyle {

    public UnitextGenNumStyle src;

    public java.util.HashMap<Integer, Integer> overrideStarts = new java.util.HashMap<Integer, Integer>();

    private boolean m_Overs = false;

    private String _id;

    @Override
    public String getId() {
        return _id;
    }

    public String setId(String value) {
        _id = value;
        return _id;
    }


    @Override
    public String getTxt() {
        return src.getTxt();
    }


    @Override
    public int getLvl() {
        return src.getLvl();
    }


    @Override
    public boolean isBullet() {
        return src.isBullet();
    }


    @Override
    public String toString() {
        String res = ("Id=" + this.getId() + " => " + src.toString());
        for (java.util.Map.Entry<Integer, Integer> kp : overrideStarts.entrySet()) {
            res = (res + " Strrt[" + kp.getKey() + "]=" + kp.getValue());
        }
        return res;
    }

    private void _prep() {
        if (!m_Overs) {
            for (java.util.Map.Entry<Integer, Integer> kp : overrideStarts.entrySet()) {
                if (kp.getKey() >= 0 && (kp.getKey() < src.levels.size())) 
                    src.levels.get(kp.getKey()).start = kp.getValue();
            }
            m_Overs = true;
        }
    }

    @Override
    public UniTextGenNumLevel getLevel(int lev) {
        this._prep();
        return src.getLevel(lev);
    }

    @Override
    public String process(int lev, boolean init) {
        this._prep();
        return src.process(lev, init);
    }

    public static UnitextGenNumStyleEx _new438(UnitextGenNumStyle _arg1) {
        UnitextGenNumStyleEx res = new UnitextGenNumStyleEx();
        res.src = _arg1;
        return res;
    }
    public UnitextGenNumStyleEx() {
    }
}
