Class NoCachingNoUpdating.DisposableCharArray

java.lang.Object
com.landawn.abacus.util.NoCachingNoUpdating.DisposableCharArray
All Implemented Interfaces:
NoCachingNoUpdating, Cloneable
Enclosing interface:
NoCachingNoUpdating

@Beta @SequentialOnly @Stateful public static class NoCachingNoUpdating.DisposableCharArray extends Object implements NoCachingNoUpdating, Cloneable
One-off Object. No caching/saving in memory, No updating. To cache/save/update the Object, call clone()/copy().
Depends on context, it should be okay to cache/save the elements from the array, but never save or cache the array itself.
  • Method Details

    • create

      public static NoCachingNoUpdating.DisposableCharArray create(int len)
      Parameters:
      len -
      Returns:
    • wrap

      public static NoCachingNoUpdating.DisposableCharArray wrap(char[] a)
      Parameters:
      a -
      Returns:
    • get

      public char get(int index)
      Parameters:
      index -
      Returns:
    • length

      public int length()
      Returns:
    • clone

      public char[] clone()
      Returns:
    • box

      public Character[] box()
      Returns:
    • toList

      public CharList toList()
      Returns:
    • toCollection

      public <C extends Collection<Character>> C toCollection(IntFunction<? extends C> supplier)
      Type Parameters:
      C -
      Parameters:
      supplier -
      Returns:
    • sum

      public int sum()
      Returns:
    • average

      public double average()
      Returns:
    • min

      public char min()
      Returns:
    • max

      public char max()
      Returns:
    • forEach

      public <E extends Exception> void forEach(Throwables.CharConsumer<E> action) throws E
      Type Parameters:
      E -
      Parameters:
      action -
      Throws:
      E
    • apply

      public <R, E extends Exception> R apply(Throwables.Function<? super char[],? extends R,E> func) throws E
      Type Parameters:
      R -
      E -
      Parameters:
      func -
      Returns:
      Throws:
      E
    • accept

      public <E extends Exception> void accept(Throwables.Consumer<? super char[],E> action) throws E
      Type Parameters:
      E -
      Parameters:
      action -
      Throws:
      E
    • join

      public String join(String delimiter)
      Parameters:
      delimiter -
      Returns:
    • join

      public String join(String delimiter, String prefix, String suffix)
      Parameters:
      delimiter -
      prefix -
      suffix -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns: