src/main/java/com/antbrains/wordseg/luceneanalyzer/AttributeSource.java
public final <A extends Attribute> A addAttribute(Class<A> attClass) {
    AttributeImpl attImpl = attributes.get(attClass);
    if (attImpl == null) {
      if (!(attClass.isInterface() && Attribute.class.isAssignableFrom(attClass))) {
        throw new IllegalArgumentException(
            "addAttribute() only accepts an interface that extends Attribute, but "
                + attClass.getName() + " does not fulfil this contract.");
      }
      addAttributeImpl(attImpl = this.factory.createAttributeInstance(attClass));
    }
    return attClass.cast(attImpl);
  }
/**
   * The caller must pass in a Class&lt;? extends Attribute&gt; value. This method first checks if
   * an instance of that class is already in this AttributeSource and returns it. Otherwise a new
   * instance is created, added to this AttributeSource and returned.
   */
The caller must pass in a Class<. extends Attribute> value. This method first checks if
an instance of that class is already in this AttributeSource and returns it. Otherwise a new
instance is created, added to this AttributeSource and returned.
The caller must pass in a Class< . extends Attribute > value . This method first checks if an instance of that class is already in this AttributeSource and returns it . Otherwise a new instance is created added to this AttributeSource and returned .
public final <A extends Attribute> A addAttribute(Class<A> attClass) {
    AttributeImpl attImpl = attributes.get(attClass);
    if (attImpl == null) {
      if (!(attClass.isInterface() && Attribute.class.isAssignableFrom(attClass))) {
        throw new IllegalArgumentException(
            "addAttribute() only accepts an interface that extends Attribute, but "
                + attClass.getName() + " does not fulfil this contract.");
      }
      addAttributeImpl(attImpl = this.factory.createAttributeInstance(attClass));
    }
    return attClass.cast(attImpl);
  }
public final < A extends Attribute > A addAttribute ( Class < A > attClass ) { AttributeImpl attImpl = attributes . get ( attClass ) ; if ( attImpl == null ) { if ( ! ( attClass . isInterface ( ) && Attribute . class . isAssignableFrom ( attClass ) ) ) { throw new IllegalArgumentException ( "addAttribute() only accepts an interface that extends Attribute, but " + attClass . getName ( ) + " does not fulfil this contract." ) ; } addAttributeImpl ( attImpl = this . factory . createAttributeInstance ( attClass ) ) ; } return attClass . cast ( attImpl ) ; }
The caller must pass in a Class&lt;?
The caller must pass in a Class&lt ; ?