test_class.file: leshan-core/src/test/java/org/eclipse/leshan/core/attributes/AttributeSetTest.java
test_class.identifier: AttributeSetTest
test_case.body: @Test(expected = IllegalArgumentException.class)
      public void should_throw_on_invalid_pmin_pmax() {
          AttributeSet sut = new AttributeSet(new Attribute(Attribute.MINIMUM_PERIOD, 50L),
                  new Attribute(Attribute.MAXIMUM_PERIOD, 49L));
  
          // pmin cannot be greater then pmax
          sut.validate(AssignationLevel.RESOURCE);
      }
test_case.class_method_signature: AttributeSetTest.should_throw_on_invalid_pmin_pmax()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void should_throw_on_invalid_pmin_pmax()
test_case.identifier: should_throw_on_invalid_pmin_pmax
test_case.invocations: validate
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_throw_on_invalid_pmin_pmax()
focal_class.declarator: attributeMap = new LinkedHashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Attribute> attributeMap = new LinkedHashMap<>();
focal_class.type: Map<String, Attribute>
focal_class.var_name: attributeMap
focal_class.file: leshan-core/src/main/java/org/eclipse/leshan/core/attributes/AttributeSet.java
focal_class.identifier: AttributeSet
focal_class.class_method_signature: AttributeSet.AttributeSet(Attribute... attributes)
focal_class.full_signature: public  AttributeSet(Attribute... attributes)
focal_class.identifier: AttributeSet
focal_class.modifiers: public
focal_class.parameters: (Attribute... attributes)
focal_class.signature:  AttributeSet(Attribute... attributes)
focal_class.class_method_signature: AttributeSet.AttributeSet(Collection<Attribute> attributes)
focal_class.full_signature: public  AttributeSet(Collection<Attribute> attributes)
focal_class.identifier: AttributeSet
focal_class.modifiers: public
focal_class.parameters: (Collection<Attribute> attributes)
focal_class.signature:  AttributeSet(Collection<Attribute> attributes)
focal_class.class_method_signature: AttributeSet.validate(AssignationLevel assignationLevel)
focal_class.full_signature: public void validate(AssignationLevel assignationLevel)
focal_class.identifier: validate
focal_class.modifiers: public
focal_class.parameters: (AssignationLevel assignationLevel)
focal_class.return: void
focal_class.signature: void validate(AssignationLevel assignationLevel)
focal_class.class_method_signature: AttributeSet.filter(Attachment attachment)
focal_class.full_signature: public AttributeSet filter(Attachment attachment)
focal_class.identifier: filter
focal_class.modifiers: public
focal_class.parameters: (Attachment attachment)
focal_class.return: AttributeSet
focal_class.signature: AttributeSet filter(Attachment attachment)
focal_class.class_method_signature: AttributeSet.merge(AttributeSet attributes)
focal_class.full_signature: public AttributeSet merge(AttributeSet attributes)
focal_class.identifier: merge
focal_class.modifiers: public
focal_class.parameters: (AttributeSet attributes)
focal_class.return: AttributeSet
focal_class.signature: AttributeSet merge(AttributeSet attributes)
focal_class.class_method_signature: AttributeSet.getMap()
focal_class.full_signature: public Map<String, Object> getMap()
focal_class.identifier: getMap
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> getMap()
focal_class.class_method_signature: AttributeSet.getAttributes()
focal_class.full_signature: public Collection<Attribute> getAttributes()
focal_class.identifier: getAttributes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<Attribute>
focal_class.signature: Collection<Attribute> getAttributes()
focal_class.class_method_signature: AttributeSet.toQueryParams()
focal_class.full_signature: public String[] toQueryParams()
focal_class.identifier: toQueryParams
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] toQueryParams()
focal_class.class_method_signature: AttributeSet.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: AttributeSet.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: AttributeSet.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: AttributeSet.parse(String uriQueries)
focal_class.full_signature: public static AttributeSet parse(String uriQueries)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (String uriQueries)
focal_class.return: AttributeSet
focal_class.signature: AttributeSet parse(String uriQueries)
focal_class.class_method_signature: AttributeSet.parse(String... queryParams)
focal_class.full_signature: public static AttributeSet parse(String... queryParams)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (String... queryParams)
focal_class.return: AttributeSet
focal_class.signature: AttributeSet parse(String... queryParams)
focal_class.class_method_signature: AttributeSet.parse(Collection<String> queryParams)
focal_class.full_signature: public static AttributeSet parse(Collection<String> queryParams)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (Collection<String> queryParams)
focal_class.return: AttributeSet
focal_class.signature: AttributeSet parse(Collection<String> queryParams)
focal_method.body: public void validate(AssignationLevel assignationLevel) {
          // Can all attributes be assigned to this level?
          for (Attribute attr : attributeMap.values()) {
              if (!attr.canBeAssignedTo(assignationLevel)) {
                  throw new IllegalArgumentException(String.format("Attribute '%s' cannot be assigned to level %s",
                          attr.getCoRELinkParam(), assignationLevel.name()));
              }
          }
          Attribute pmin = attributeMap.get(Attribute.MINIMUM_PERIOD);
          Attribute pmax = attributeMap.get(Attribute.MAXIMUM_PERIOD);
          if ((pmin != null) && (pmax != null) && (Long) pmin.getValue() > (Long) pmax.getValue()) {
              throw new IllegalArgumentException(String.format("Cannot write attributes where '%s' > '%s'",
                      pmin.getCoRELinkParam(), pmax.getCoRELinkParam()));
          }
      }
focal_method.class_method_signature: AttributeSet.validate(AssignationLevel assignationLevel)
focal_method.full_signature: public void validate(AssignationLevel assignationLevel)
focal_method.identifier: validate
focal_method.invocations: values canBeAssignedTo format getCoRELinkParam name get get getValue getValue format getCoRELinkParam getCoRELinkParam
focal_method.modifiers: public
focal_method.parameters: (AssignationLevel assignationLevel)
focal_method.return: void
focal_method.signature: void validate(AssignationLevel assignationLevel)