@Test public void testToString() { assertEquals(tested.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE + ":" + CONSTRUCTOR_TAGS); assertNotEquals(tested.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE + ":" + "[myCustomTag]"); VariableDeclaration comparable = new VariableDeclaration(CONSTRUCTOR_IDENTIFIER, CONSTRUCTOR_TYPE, null); assertEquals(comparable.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE); comparable = new VariableDeclaration(CONSTRUCTOR_IDENTIFIER, CONSTRUCTOR_TYPE, ""); assertEquals(comparable.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE); }
@Override public String toString() { String tagString = ""; if (!Strings.isNullOrEmpty(tags)) { tagString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagString; } else { return typedIdentifier.getName() + ":" + type + tagString; } }
VariableDeclaration { @Override public String toString() { String tagString = ""; if (!Strings.isNullOrEmpty(tags)) { tagString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagString; } else { return typedIdentifier.getName() + ":" + type + tagString; } } }
VariableDeclaration { @Override public String toString() { String tagString = ""; if (!Strings.isNullOrEmpty(tags)) { tagString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagString; } else { return typedIdentifier.getName() + ":" + type + tagString; } } VariableDeclaration(String identifier, String type);  VariableDeclaration(String identifier, String type, String tags); }
VariableDeclaration { @Override public String toString() { String tagString = ""; if (!Strings.isNullOrEmpty(tags)) { tagString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagString; } else { return typedIdentifier.getName() + ":" + type + tagString; } } VariableDeclaration(String identifier, String type);  VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); void setIdentifier(String identifier); String getType(); void setType(String type); ItemDefinition getTypeDeclaration(); Property getTypedIdentifier(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
VariableDeclaration { @Override public String toString() { String tagString = ""; if (!Strings.isNullOrEmpty(tags)) { tagString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagString; } else { return typedIdentifier.getName() + ":" + type + tagString; } } VariableDeclaration(String identifier, String type);  VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); void setIdentifier(String identifier); String getType(); void setType(String type); ItemDefinition getTypeDeclaration(); Property getTypedIdentifier(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }