@Test public void testCreatingTagForNullValueReturnsEmptyTag() { Assert.assertEquals(Tag.EMPTY_TAG, Tag.create(null)); }
public static Tag create(String value) { if(Strings.isNullOrEmpty(value)) { return EMPTY_TAG; } else { return new Tag(value); } }
Tag implements Comparable<Tag> { public static Tag create(String value) { if(Strings.isNullOrEmpty(value)) { return EMPTY_TAG; } else { return new Tag(value); } } }
Tag implements Comparable<Tag> { public static Tag create(String value) { if(Strings.isNullOrEmpty(value)) { return EMPTY_TAG; } else { return new Tag(value); } } private  Tag(String value); }
Tag implements Comparable<Tag> { public static Tag create(String value) { if(Strings.isNullOrEmpty(value)) { return EMPTY_TAG; } else { return new Tag(value); } } private  Tag(String value); static Tag create(String value); @Override int compareTo(Tag other); @Override boolean equals(Object other); @Override String toString(); }
Tag implements Comparable<Tag> { public static Tag create(String value) { if(Strings.isNullOrEmpty(value)) { return EMPTY_TAG; } else { return new Tag(value); } } private  Tag(String value); static Tag create(String value); @Override int compareTo(Tag other); @Override boolean equals(Object other); @Override String toString(); static final Tag EMPTY_TAG; }