All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.deevvi.device.detector.engine.utils.Tuple Maven / Gradle / Ivy

Go to download

The aim of this library is to fetch as much as possible information from a user-agent string.

There is a newer version: 1.14.0
Show newest version
package com.deevvi.device.detector.engine.utils;

import com.google.common.base.Preconditions;

import java.util.regex.Matcher;

/**
 * Pojo class that keeps related info loaded from file about client or device or OS and a regex matcher.
 */
public final class Tuple {

    /**
     * Client info.
     */
    private final T t;

    /**
     * Regex matcher
     */
    private final Matcher matcher;

    /**
     * Constructor.
     */
    public Tuple(T t, Matcher matcher) {

        Preconditions.checkNotNull(t, "Client cannot be null.");
        Preconditions.checkNotNull(matcher, "Matcher cannot be null.");

        this.t = t;
        this.matcher = matcher;
    }

    /**
     * Get client.
     *
     * @return client
     */
    public T get() {
        return t;
    }

    /**
     * Get matcher.
     *
     * @return matcher
     */
    public Matcher getMatcher() {
        return matcher;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy