Top Description Fields Constructors Methods
de.undercouch.citeproc.csl.internal.token

public abstract Class Token

extends Object
Class Inheritance
Known Direct Subclasses
de.undercouch.citeproc.csl.internal.token.DisplayGroupToken, de.undercouch.citeproc.csl.internal.token.TextToken

A rendered token
Author
Michel Kraemer

Field Summary

Modifier and TypeField and Description
private final boolean
private final int

Constructor Summary

AccessConstructor and Description
public
Token(int
the token's formatting attributes
formattingAttributes
,
boolean
true if the token is part of the first rendered field in a bibliography entry
firstField
)

Construct a new token

Method Summary

Modifier and TypeMethod and Description
public abstract Token

Returns:

the copied token
copyWithFirstField
(boolean
the new first-field flag
firstField
)

Create a copy of this token but replaces its first-field flag

public int

Returns:

the formatting attributes
getFormattingAttributes
()

Get the token's formatting attributes

public boolean

Returns:

true if the token is part of the first field
isFirstField
()

Return true if the token is part of the first rendered field in a bibliography entry

public abstract Token

Returns:

the new token with wrapped formatting attributes
wrapFormattingAttributes
(int
the other formatting attributes
otherFormattingAttributes
)

Wrap other formatting attributes around the formatting attributes of this token and return a new token.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

firstFieldback to summary
private final boolean firstField
formattingAttributesback to summary
private final int formattingAttributes

Constructor Detail

Tokenback to summary
public Token(int formattingAttributes, boolean firstField)

Construct a new token

Parameters
formattingAttributes:int

the token's formatting attributes

firstField:boolean

true if the token is part of the first rendered field in a bibliography entry

Method Detail

copyWithFirstFieldback to summary
public abstract Token copyWithFirstField(boolean firstField)

Create a copy of this token but replaces its first-field flag

Parameters
firstField:boolean

the new first-field flag

Returns:Token

the copied token

getFormattingAttributesback to summary
public int getFormattingAttributes()

Get the token's formatting attributes

Returns:int

the formatting attributes

isFirstFieldback to summary
public boolean isFirstField()

Return true if the token is part of the first rendered field in a bibliography entry

Returns:boolean

true if the token is part of the first field

wrapFormattingAttributesback to summary
public abstract Token wrapFormattingAttributes(int otherFormattingAttributes)

Wrap other formatting attributes around the formatting attributes of this token and return a new token. The formatting attributes of this token will be merged into the other attributes, so that attributes that are set in this token overwrite the other attributes.

Parameters
otherFormattingAttributes:int

the other formatting attributes

Returns:Token

the new token with wrapped formatting attributes