SymbolImpl implements Symbol { @Override public boolean is(Kind... kinds) { Kind symbolKind = kind(); for (Kind kindIter : kinds) { if (symbolKind == kindIter) { return true; } } return false; } SymbolImpl(String name, @Nullable String fullyQualifiedName);  SymbolImpl(String name, @Nullable String fullyQualifiedName, @Nullable String annotatedTypeName); @Override String name(); @Override List<Usage> usages(); @CheckForNull @Override String fullyQualifiedName(); @Override boolean is(Kind... kinds); @Override Kind kind(); void setKind(Kind kind); InferredType inferredType(); void setInferredType(InferredType inferredType); @Override String annotatedTypeName(); void setAnnotatedTypeName(TypeAnnotation typeAnnotation); void removeUsages();  }
@Test public void assert_is() { Symbol x = symbols("x = 42").get("x"); assertThat(x.is(Symbol.Kind.OTHER)).isTrue(); Symbol foo = symbols("def foo(): ...").get("foo"); assertThat(foo.is(Symbol.Kind.FUNCTION)).isTrue(); assertThat(foo.is(Symbol.Kind.OTHER)).isFalse(); assertThat(foo.is(Symbol.Kind.OTHER, Symbol.Kind.FUNCTION)).isTrue(); }