Class TupleType.IntStringCache

java.lang.Object
net.hydromatic.morel.type.TupleType.IntStringCache
Enclosing class:
TupleType

private static class TupleType.IntStringCache extends Object
Cache of the string representations of integers.

Ensures that we do not continually re-compute the strings, and provides lists of the first N integers (0-based or 1-based) as needed.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) com.google.common.collect.ImmutableList<String>
    Marked volatile to ensure that the cache is not optimized away.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) com.google.common.collect.ImmutableList<String>
    ensure(int minimumSize)
    Returns a list of strings that is at least minimumSize long.
    (package private) List<String>
    subList(int start, int end)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • list

      volatile com.google.common.collect.ImmutableList<String> list
      Marked volatile to ensure that the cache is not optimized away.
  • Constructor Details

    • IntStringCache

      private IntStringCache()
  • Method Details

    • ensure

      com.google.common.collect.ImmutableList<String> ensure(int minimumSize)
      Returns a list of strings that is at least minimumSize long.
    • subList

      List<String> subList(int start, int end)