public class TEIHeaderAuthor
extends java.lang.Object
implements java.lang.Comparable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
authorMap
Author map.
|
| Constructor and Description |
|---|
TEIHeaderAuthor(java.util.Map<java.lang.String,java.lang.String> authorMap)
Create author map.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(TEIHeaderAuthor a1,
TEIHeaderAuthor a2)
Compare two authors for order.
|
int |
compareTo(java.lang.Object object)
Compare this object with another.
|
boolean |
equals(java.lang.Object obj)
Two authors are the same if all their details agree.
|
java.lang.String |
getName()
Get author name.
|
protected java.lang.String |
safeString(java.lang.String s)
Return string ensuring null is set to empty string.
|
java.lang.String |
toString()
Return author name as string.
|
protected java.util.Map<java.lang.String,java.lang.String> authorMap
public TEIHeaderAuthor(java.util.Map<java.lang.String,java.lang.String> authorMap)
authorMap - The author map.public java.lang.String getName()
protected java.lang.String safeString(java.lang.String s)
s - String to check.public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(java.lang.Object object)
compareTo in interface java.lang.Comparableobject - The other object.public int compare(TEIHeaderAuthor a1, TEIHeaderAuthor a2)
a1 - First author.a2 - Second author.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Object to compare for equality to this one,Two authors are assumed to be the same if all their details agree.