@Test void ofShouldRejectNullValue() { assertThatThrownBy(() -> AttributeName.of(null)) .isInstanceOf(NullPointerException.class); }
public static AttributeName of(String name) { Preconditions.checkNotNull(name, "`name` is compulsory"); Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "`name` should not be empty"); return new AttributeName(name); }
AttributeName { public static AttributeName of(String name) { Preconditions.checkNotNull(name, "`name` is compulsory"); Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "`name` should not be empty"); return new AttributeName(name); } }
AttributeName { public static AttributeName of(String name) { Preconditions.checkNotNull(name, "`name` is compulsory"); Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "`name` should not be empty"); return new AttributeName(name); } private  AttributeName(String name); }
AttributeName { public static AttributeName of(String name) { Preconditions.checkNotNull(name, "`name` is compulsory"); Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "`name` should not be empty"); return new AttributeName(name); } private  AttributeName(String name); static AttributeName of(String name); Attribute withValue(AttributeValue<?> value); String asString(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString(); }
AttributeName { public static AttributeName of(String name) { Preconditions.checkNotNull(name, "`name` is compulsory"); Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "`name` should not be empty"); return new AttributeName(name); } private  AttributeName(String name); static AttributeName of(String name); Attribute withValue(AttributeValue<?> value); String asString(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString();  }