code: public Scope setAttributes(Iterable<Pair> attributes)
      {
          if (attributes == null)
          {
              this.attributes = null;
  
              return this;
          }
  
          List<Pair> list = new ArrayList<Pair>();
  
          for (Pair attribute : attributes)
          {
              if (attribute == null || attribute.getKey() == null)
              {
                  continue;
              }
  
              list.add(attribute);
          }
  
          int size = list.size();
  
          if (size == 0)
          {
              this.attributes = null;
  
              return this;
          }
  
          Pair[] array = new Pair[size];
          this.attributes = list.toArray(array);
  
          return this;
      }
docs: Set attributes.
  
  @param attributes
  Attributes.
  
  @return
  {@code this} object.
  
  @since 2.12