public class SentenceUnitID extends ParagraphUnitID
Constants.CHECK_DUPLICITY_LEVEL
).
This class is *IMMUTABLE*, which means that each time a method that is supposed
to change something is called, another instance is returned. The objects of this
type are pooled using SentenceUnitIDPool
so that only one
instance of SentenceUnitID exists for each document.GENERAL_SEP, REVISION_SEP
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object obj) |
boolean |
equals(Object obj) |
static SentenceUnitID |
getInstance(long documentUID,
int documentDBRevision,
short paragraph,
short sentenceInParagraph)
This is the recommended way to create an instance.
|
short |
getSentenceInParagraph() |
int |
hashCode() |
static SentenceUnitID |
load(DataInputStream dis) |
void |
store(DataOutputStream dos) |
String |
toNiceMeString()
Returns textual representation of the unit to be printed in duplicity checking reports.
|
String |
toNiceOtherString()
Returns textual representation of the unit to be printed in duplicity checking reports.
|
String |
toString() |
getInstance, getParagraph
getDocumentDBRevision, getDocumentUID, getInstance, releasePools
public static SentenceUnitID getInstance(long documentUID, int documentDBRevision, short paragraph, short sentenceInParagraph)
documentUID
- documentDBRevision
- paragraph
- sentenceInParagraph
- public short getSentenceInParagraph()
public String toString()
toString
in class ParagraphUnitID
public String toNiceMeString()
toNiceMeString
in class ParagraphUnitID
public String toNiceOtherString()
toNiceOtherString
in class ParagraphUnitID
public int compareTo(Object obj)
compareTo
in interface Comparable
compareTo
in class ParagraphUnitID
obj
- public boolean equals(Object obj)
equals
in class ParagraphUnitID
obj
- public int hashCode()
hashCode
in class ParagraphUnitID
public void store(DataOutputStream dos) throws IOException
store
in class ParagraphUnitID
dos
- IOException
public static SentenceUnitID load(DataInputStream dis) throws IOException
dis
- IOException
Copyright © 2016 Egothor. All Rights Reserved.