Added addContent method.

This commit is contained in:
Christian P. MOMON 2016-09-19 02:32:55 +02:00
parent 4703f068d1
commit 26e644b821

View file

@ -45,11 +45,10 @@ public class TagDataManager
/** /**
* *
*/ */
public SimpleTagData addContent(final String id, final String content) public void addContent(final String id, final String content)
{ {
SimpleTagData result;
TagDataListByIndex tags = (TagDataListByIndex) this.idsDataById.getId(id); TagDataListByIndex tags = (TagDataListByIndex) this.idsDataById.getId(id);
if (tags == null) if (tags == null)
{ {
this.idsDataById.setId(id, new TagDataListByIndex()); this.idsDataById.setId(id, new TagDataListByIndex());
@ -58,12 +57,9 @@ public class TagDataManager
} }
// Be sure that lines are existing. // Be sure that lines are existing.
result = new SimpleTagData(); SimpleTagData tag = new SimpleTagData();
result.setContent(content); tag.setContent(content);
tags.add(result); tags.add(tag);
//
return result;
} }
/** /**
@ -120,6 +116,15 @@ public class TagDataManager
tag.appendContent(value); tag.appendContent(value);
} }
/**
*
*/
public void appendContent(final String id, final String value)
{
SimpleTagData tag = this.getIdData(id);
tag.appendContent(value);
}
/** /**
* *
*/ */
@ -138,7 +143,7 @@ public class TagDataManager
} }
// //
return (result); return result;
} }
/** /**
@ -168,7 +173,7 @@ public class TagDataManager
result = (SimpleTagData) tags.elementAt(line); result = (SimpleTagData) tags.elementAt(line);
// //
return (result); return result;
} }
/** /**
@ -207,7 +212,7 @@ public class TagDataManager
} }
// //
return (result); return result;
} }
/** /**
@ -220,7 +225,7 @@ public class TagDataManager
result = this.idsDataById; result = this.idsDataById;
// //
return (result); return result;
} }
/** /**