Skip to content

Commit

Permalink
add addTag(String) helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Aug 18, 2016
1 parent 45ae6f1 commit 8f842a4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/minigl/src/main/java/org/jpos/gl/GLEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,15 @@ public Element toXML (boolean deep) {
elem.addContent (amount);
return elem;
}

/**
* @param tag to add
* @return this
*/
public GLEntry addTag (String tag) {
getTags().add(tag);
return this;
}
public boolean equals(Object other) {
if ( !(other instanceof GLEntry) ) return false;
GLEntry castOther = (GLEntry) other;
Expand Down
10 changes: 10 additions & 0 deletions modules/minigl/src/main/java/org/jpos/gl/GLTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ public void setTags (Tags tags) {
public Tags getTags () {
return tags;
}

/**
* @param tag to add
* @return this
*/
public GLTransaction addTag (String tag) {
getTags().add(tag);
return this;
}

/**
* Entries.
* @param entries transaction entries
Expand Down

0 comments on commit 8f842a4

Please sign in to comment.