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

com.redhat.ceylon.compiler.java.language.ObjectArrayIterable Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.redhat.ceylon.compiler.java.language;

import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;

/* Implement Iterable */
public final class ObjectArrayIterable 
extends AbstractArrayIterable {

    public ObjectArrayIterable(Object[] array, int start, int len, int step) {
        super(TypeDescriptor.klass(array.getClass().getComponentType()), 
                array, start, len, step);
    }

    public ObjectArrayIterable(Object[] array, int length) {
        super(TypeDescriptor.klass(array.getClass().getComponentType()),
                array, length);
    }
    
    public ObjectArrayIterable(TypeDescriptor reifiedElement, Object[] array) {
        super(reifiedElement, array, array.length);
    }

    @Override
    protected ObjectArrayIterable newInstance(Object[] array, int start,
            int len, int step) {
        return new ObjectArrayIterable(array, start, len, step);
    }

    @Override
    protected T get(Object[] array, int index) {
        return (T)array[index];
    }
    
    @Override
    public ObjectArrayIterable take(long take) {
        return (ObjectArrayIterable)super.take(take);
    }
    
    @Override
    public ObjectArrayIterable skip(long take) {
        return (ObjectArrayIterable)super.skip(take);
    }
    
    @Override
    public ObjectArrayIterable by(long take) {
        return (ObjectArrayIterable)super.by(take);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy