Class EmptyCollectionHelper


  • final class EmptyCollectionHelper
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  EmptyCollectionHelper.ECollectionSubType
      Internal Enumeration used to group the types of element
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static EmptyCollectionHelper.ECollectionSubType determineCollectionSubType​(char _sig)
      The starting type determines of a collection determines when it ends
      private static int determineEndOfBracketStructure​(byte[] _sigb, int _currentOffset, char _openChar, char _closeChar)
      This is a generic function to determine the end of a structure that has opening and closing characters.
      (package private) static int determineSignatureOffsetArray​(byte[] _sigb, int _currentOffset)
      This function determine the new offset in signature for empty Array/List collections.
      (package private) static int determineSignatureOffsetDict​(byte[] _sigb, int _currentOffset)
      This function determine the new offset in signature for empty Dictionary/Map collections.
      private static int determineSignatureOffsetStruct​(byte[] _sigb, int _currentOffset)  
      private static java.lang.String determineSubSignature​(byte[] _sigb, int _currentOffset)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmptyCollectionHelper

        private EmptyCollectionHelper()
    • Method Detail

      • determineSignatureOffsetDict

        static int determineSignatureOffsetDict​(byte[] _sigb,
                                                int _currentOffset)
        This function determine the new offset in signature for empty Dictionary/Map collections. Normally the element inside a collection determines the new offset, however in case of empty collections there is no element to determine the sub signature of the list so this function determines which part of the signature to skip
        Parameters:
        _sigb - the total signature
        _currentOffset - the current offset within the signature
        Returns:
        the index of the last element of the collection (subtype)
      • determineSignatureOffsetArray

        static int determineSignatureOffsetArray​(byte[] _sigb,
                                                 int _currentOffset)
        This function determine the new offset in signature for empty Array/List collections. Normally the element inside a collection determines the new offset, however in case of empty collections there is no element to determine the sub signature of the list so this function determines which part of the signature to skip
        Parameters:
        _sigb - the total signature
        _currentOffset - the current offset within the signature
        Returns:
        the index of the last element of the collection (subtype)
      • determineSignatureOffsetStruct

        private static int determineSignatureOffsetStruct​(byte[] _sigb,
                                                          int _currentOffset)
      • determineEndOfBracketStructure

        private static int determineEndOfBracketStructure​(byte[] _sigb,
                                                          int _currentOffset,
                                                          char _openChar,
                                                          char _closeChar)
        This is a generic function to determine the end of a structure that has opening and closing characters. Currently used for Struct () and Dict {}
      • determineSubSignature

        private static java.lang.String determineSubSignature​(byte[] _sigb,
                                                              int _currentOffset)
      • determineCollectionSubType

        private static EmptyCollectionHelper.ECollectionSubType determineCollectionSubType​(char _sig)
        The starting type determines of a collection determines when it ends
        Parameters:
        _sig - the signature letter of the type