// Path: app/src/main/java/com/annimon/hotarufx/exceptions/ArgumentsMismatchException.java
// public class ArgumentsMismatchException extends HotaruRuntimeException {
// 
//     public ArgumentsMismatchException(String message) {
//         super(message);
//     }
// 
//     public ArgumentsMismatchException(String message, SourcePosition start, SourcePosition end) {
//         super(message, start, end);
//     }
// }
// 
// Path: app/src/main/java/com/annimon/hotarufx/exceptions/TypeException.java
// public class TypeException extends HotaruRuntimeException {
// 
//     public TypeException(String message) {
//         super(message);
//     }
// 
//     public TypeException(String message, SourcePosition start, SourcePosition end) {
//         super(message, start, end);
//     }
// }


import com.annimon.hotarufx.exceptions.ArgumentsMismatchException;
import com.annimon.hotarufx.exceptions.TypeException;
package com.annimon.hotarufx.lib;


public class Validator {

    public static Validator with(Value[] args) {
        return new Validator(args);
    }

    private final Value[] args;

    private Validator(Value[] args) {
        this.args = args;
    }

    public Validator check(int expected) {
// Path: app/src/main/java/com/annimon/hotarufx/exceptions/ArgumentsMismatchException.java
// public class ArgumentsMismatchException extends HotaruRuntimeException {
// 
//     public ArgumentsMismatchException(String message) {
//         super(message);
//     }
// 
//     public ArgumentsMismatchException(String message, SourcePosition start, SourcePosition end) {
//         super(message, start, end);
//     }
// }
// 
// Path: app/src/main/java/com/annimon/hotarufx/exceptions/TypeException.java
// public class TypeException extends HotaruRuntimeException {
// 
//     public TypeException(String message) {
//         super(message);
//     }
// 
//     public TypeException(String message, SourcePosition start, SourcePosition end) {
//         super(message, start, end);
//     }
// }


// Path: app/src/main/java/com/annimon/hotarufx/lib/Validator.java
import com.annimon.hotarufx.exceptions.ArgumentsMismatchException;
import com.annimon.hotarufx.exceptions.TypeException;

package com.annimon.hotarufx.lib;


public class Validator {

    public static Validator with(Value[] args) {
        return new Validator(args);
    }

    private final Value[] args;

    private Validator(Value[] args) {
        this.args = args;
    }

    public Validator check(int expected) {
        if (args.length != expected) throw new ArgumentsMismatchException(String.format(