Documentation of 'cc.redberry.core.indexgenerator.IndexGeneratorImpl' Java class
IndexGeneratorImpl
cc.redberry.core.indexgenerator

Class IndexGeneratorImpl

  • All Implemented Interfaces:
    IndexGenerator


    public final class IndexGeneratorImpl
    extends java.lang.Object
    implements IndexGenerator
    Generates distinct indices of particular types, which does not contain in specified sets of indices (engaged data).
    Since:
    1.0
    • Constructor Detail

      • IndexGeneratorImpl

        public IndexGeneratorImpl()
        Creates with generator without engaged data.
      • IndexGeneratorImpl

        public IndexGeneratorImpl(Indices indices)
        Creates with generator with specified engaged data.
        Parameters:
        indices - forbidden indices
      • IndexGeneratorImpl

        public IndexGeneratorImpl(int[] indices)
        Creates with generator with specified engaged data.
        Parameters:
        indices - forbidden indices
    • Method Detail

      • contains

        public boolean contains(int index)
        Returns true if index contains in engaged data or already was generated.
        Parameters:
        index - index
        Returns:
        true if index contains in engaged data or already was generated
      • mergeFrom

        public void mergeFrom(IndexGeneratorImpl other)
        Merges from specified generator.
        Parameters:
        other - index generator
      • generate

        public int generate(IndexType type)
        Generates new index of a particular type.
        Parameters:
        type - index type
        Returns:
        new index of a particular type
      • generate

        public int generate(byte type)
        Generates new index of a particular type.
        Specified by:
        generate in interface IndexGenerator
        Parameters:
        type - index type
        Returns:
        new index of a particular type

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.