LengthRule.java 830 Bytes
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xmp.schema.model.rules;

import com.adobe.xmp.schema.model.SchemaVisitor;
import com.adobe.xmp.schema.model.TypeRule;
import com.adobe.xmp.schema.model.XMPSchemaException;

public class LengthRule
implements TypeRule {
    private static final long serialVersionUID = 1;
    private TypeRule.ComparisonOperator operator;
    private int operand;

    public LengthRule(TypeRule.ComparisonOperator operator, int length) {
        this.operator = operator;
        this.operand = length;
    }

    public TypeRule.ComparisonOperator getOperator() {
        return this.operator;
    }

    public int getOperand() {
        return this.operand;
    }

    public void accept(SchemaVisitor schemaVisitor) throws XMPSchemaException {
        schemaVisitor.visit(this);
    }
}