public class AdhocCode extends Object implements ReportCode
FixedCode
(create as many new enum constants as you want)
where possible, so that static determination of possible codes
works as well as it can.Modifier and Type | Field and Description |
---|---|
static int |
LABEL_LENGTH
Required length of labels.
|
Constructor and Description |
---|
AdhocCode(ReportType type,
String label)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static AdhocCode |
createCodeFromText(ReportType type,
String text)
Uses some hash function to generate a report code from text.
|
static String |
createLabelChars(Object id,
int nchar)
Uses some hash function to generate a fixed-length character string
from a supplied object.
|
boolean |
equals(Object o) |
String |
getLabel()
Returns the 4-character label of this code.
|
ReportType |
getType()
Returns the type of this code.
|
int |
hashCode() |
public static final int LABEL_LENGTH
public AdhocCode(ReportType type, String label)
type
- report typelabel
- 4-character labelpublic ReportType getType()
ReportCode
getType
in interface ReportCode
public String getLabel()
ReportCode
getLabel
in interface ReportCode
public static AdhocCode createCodeFromText(ReportType type, String text)
type
- report typetext
- message textCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.