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

com.flash3388.flashlib.io.devices.DeviceId Maven / Gradle / Ivy

The newest version!
package com.flash3388.flashlib.io.devices;

public interface DeviceId {

    int id();
    Class baseType();

    static  DeviceId of(int id, Class baseType) {
        return new Impl<>(id, baseType);
    }

    class Impl implements DeviceId {

        private final int mId;
        private final Class mBaseType;

        public Impl(int id, Class baseType) {
            mId = id;
            mBaseType = baseType;
        }

        @Override
        public int id() {
            return mId;
        }

        @Override
        public Class baseType() {
            return mBaseType;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy