Documentation of 'cc.redberry.core.context.IndexConverterManager' Java class
IndexConverterManager
cc.redberry.core.context

Class IndexConverterManager



  • public final class IndexConverterManager
    extends java.lang.Object
    This class is responsible for the mapping between strings and internal integer Redberry ids of single tensor index.
    Since:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static IndexConverterManager DEFAULT
      The default index converter manager defined for all types of indices defined in enum IndexType.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getCode(java.lang.String index)
      Returns integer representation from specified string representation of single index.
      java.lang.String getSymbol(int code, OutputFormat outputFormat)
      Returns string representation from specified integer representation of single index in the specified outputFormat.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT

        public static final IndexConverterManager DEFAULT
        The default index converter manager defined for all types of indices defined in enum IndexType.
    • Constructor Detail

      • IndexConverterManager

        public IndexConverterManager(IndexSymbolConverter[] converters)
        Creates index converted manager for specified index converters.
        Parameters:
        converters - index converters
        Throws:
        java.lang.IllegalArgumentException - if several converters have the same index type
    • Method Detail

      • getSymbol

        public java.lang.String getSymbol(int code,
                                          OutputFormat outputFormat)
        Returns string representation from specified integer representation of single index in the specified outputFormat.
        Parameters:
        code - integer representation of single index
        outputFormat - output format to be used to produce string representation
        Returns:
        string representation of specified integer index
        Throws:
        java.lang.IllegalArgumentException - if rule for specified code
      • getCode

        public int getCode(java.lang.String index)
        Returns integer representation from specified string representation of single index.
        Parameters:
        index - string representation of single index
        Returns:
        integer representation of specified index
        Throws:
        java.lang.IllegalArgumentException - if rule for specified string

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.