public static class AuthorList.Author
extends java.lang.Object
Current usage: only methods getLastOnly
,
getFirstLast
, and getLastFirst
are used;
all other methods are provided for completeness.
Constructor and Description |
---|
AuthorList.Author(java.lang.String first,
java.lang.String firstabbr,
java.lang.String von,
java.lang.String last,
java.lang.String jr)
Creates the Author object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compare this object with the given one.
|
java.lang.String |
getFirst()
Returns the first name of the author stored in this object ("First").
|
java.lang.String |
getFirstAbbr()
Returns the abbreviated first name of the author stored in this
object ("F.").
|
java.lang.String |
getFirstLast(boolean abbr)
Returns the author's name in form 'First von Last, Jr.' with the
first name full or abbreviated depending on parameter.
|
java.lang.String |
getJr()
Returns the junior part of the author's name stored in this object
("Jr").
|
java.lang.String |
getLast()
Returns the last name of the author stored in this object ("Last").
|
java.lang.String |
getLastFirst(boolean abbr)
Returns the author's name in form 'von Last, Jr., First' with the
first name full or abbreviated depending on parameter.
|
java.lang.String |
getLastOnly()
Returns von-part followed by last name ("von Last").
|
java.lang.String |
getNameForAlphabetization()
Returns the name as "Last, Jr, F." omitting the von-part and removing
starting braces.
|
java.lang.String |
getVon()
Returns the von part of the author's name stored in this object
("von").
|
public AuthorList.Author(java.lang.String first, java.lang.String firstabbr, java.lang.String von, java.lang.String last, java.lang.String jr)
null
must be passes; otherwise other methods may return erroneous results.first
- the first name of the author (may consist of several
tokens, like "Charles Louis Xavier Joseph" in "Charles
Louis Xavier Joseph de la Vall{\'e}e Poussin")firstabbr
- the abbreviated first name of the author (may consist of
several tokens, like "C. L. X. J." in "Charles Louis
Xavier Joseph de la Vall{\'e}e Poussin"). It is a
responsibility of the caller to create a reasonable
abbreviation of the first name.von
- the von part of the author's name (may consist of several
tokens, like "de la" in "Charles Louis Xavier Joseph de la
Vall{\'e}e Poussin")last
- the lats name of the author (may consist of several
tokens, like "Vall{\'e}e Poussin" in "Charles Louis Xavier
Joseph de la Vall{\'e}e Poussin")jr
- the junior part of the author's name (may consist of
several tokens, like "Jr. III" in "Smith, Jr. III, John")public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String getFirst()
public java.lang.String getFirstAbbr()
public java.lang.String getVon()
public java.lang.String getLast()
public java.lang.String getJr()
public java.lang.String getLastOnly()
null
, the empty string ""
is returned.public java.lang.String getLastFirst(boolean abbr)
abbr
- true
- abbreviate first name, false
-
do not abbreviateabbr==false
) or
'von Last, Jr., F.' (if abbr==true
)public java.lang.String getFirstLast(boolean abbr)
abbr
- true
- abbreviate first name, false
-
do not abbreviateabbr==false
) or 'F.
von Last, Jr.' (if abbr==true
)public java.lang.String getNameForAlphabetization()