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

com.unit16.z.indexed.Const Maven / Gradle / Ivy

package com.unit16.z.indexed;

import java.util.Iterator;

import com.google.common.collect.Iterators;

final class Const
extends DSL
{
	private final M _m;
	Const(M m)
	{
		_m = m;
	}
	
	@Override
	public M get(int i) {
		return _m;
	}

	@Override
	public int size() {
		return Integer.MAX_VALUE;
	}

	@SuppressWarnings("unchecked")
	@Override
	public Iterator iterator() { return Iterators.cycle(_m); }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy