Guava Postfix Completion

Compatible with: IntelliJ IDEA Android Studio
06.10.2016
2 984
Postfix completion templates for guava Available templates:

  • .checkArgument
    Checks that the boolean is true
    checkArgument(expr)
  • .checkNotNull
    Checks that the value is not null
    checkNotNull(expr)
  • .checkState
    Checks some state of the object, not dependent on the method arguments
    checkState(expr)
  • .checkElementIndex
    Checks that index is a valid element index into a list, string, or array with the specified size
    checkElementIndex(index, size)
  • .checkPositionIndex
    Checks that index is a valid position index into a list, string, or array with the specified size
    checkPositionIndex(index, size)
  • .checkPositionIndexes
    Checks that [start, end) is a valid sub range of a list, string, or array with the specified size
    checkPositionIndexes(start, end, size)
  • .join
    Joins pieces of text (specified as an array, Iterable, varargs or even a Map) with a separator
    Joiner.on(',').join(iterable)
  • .split
    Extracts non-overlapping sub-strings from an input string, typically by recognizing appearances of a separator sequence
    Splitter.on(',').split(CharSequence)
  • .immutableListCopyOf
    Creates an immutable list containing the given elements, in order
    ImmutableList.copyOf(Array|Collection|Iterator|Iterable)
  • .immutableListOf
    Creates an immutable list containing a single element
    ImmutableList.of(Object)
  • .immutableSetCopyOf
    Creates an immutable set containing the given elements, in order
    ImmutableSet.copyOf(Array|Collection|Iterator|Iterable)
  • .immutableSetOf
    Creates an immutable set containing a single element
    ImmutableSet.of(Object)
  • .fluentIterable
    Creates a fluent iterable that wraps iterable, or iterable itself if it is already a FluentIterable
    FluentIterable.from(Iterable)
  • .optional
    Creates an optional around the element, if variable is annotated as @Nullable then .fromNullable will be used, .of otherwise
    Optional.of(Object)
Postfix completion templates for java 7+ Available templates:

  • .requireNonNull
    Requires that the value is not null
    requireNonNull(expr)

Download plugin

Recent change notes

* Improved checkNotNull message support by allowing no prefix to be excluded for faster completion * Added interim support for Java 7 requireNonNull