public class IdentifierHelper extends Object implements IIdentifierHelper
IIdentifierHelper
.Modifier and Type | Field and Description |
---|---|
private IIdentifierDictionary |
iddict |
Constructor and Description |
---|
IdentifierHelper(IIdentifierDictionary iddict) |
Modifier and Type | Method and Description |
---|---|
IExpandedIdentifier |
createExpandedIdentifier() |
int |
getFieldIndex(String fieldName)
|
IIdentifierDictionary |
getIdentifierDictionary()
Get the
IIdentifierDictionary associated with this helper. |
int |
getValue(IIdentifier compact,
int idx)
Get a single field value by index.
|
int |
getValue(IIdentifier compact,
String field)
Get a single field value by name.
|
boolean |
hasField(String fieldName)
Pushed up from
IIdentifierDictionary.hasField(String) . |
IIdentifier |
pack(IExpandedIdentifier id)
Pack an
IExpandedIdentifier into a compact IIdentifier . |
IExpandedIdentifier |
unpack(IIdentifier id)
Upack the
IIdentifier into an IExpandedIdentifier containing the field values in a list. |
private IIdentifierDictionary iddict
public IdentifierHelper(IIdentifierDictionary iddict)
public IIdentifierDictionary getIdentifierDictionary()
IIdentifierHelper
IIdentifierDictionary
associated with this helper.getIdentifierDictionary
in interface IIdentifierHelper
public IIdentifier pack(IExpandedIdentifier id)
IIdentifierHelper
IExpandedIdentifier
into a compact IIdentifier
.pack
in interface IIdentifierHelper
id
- The ExpandedIdentifier to be packed.public IExpandedIdentifier unpack(IIdentifier id)
IIdentifierHelper
IIdentifier
into an IExpandedIdentifier
containing the field values in a list.unpack
in interface IIdentifierHelper
id
- The Identifier.public int getValue(IIdentifier compact, int idx)
IIdentifierHelper
getValue
in interface IIdentifierHelper
compact
- The compact Identifier.idx
- The field index in the dictionary.public int getFieldIndex(String fieldName)
IIdentifierHelper
getFieldIndex
in interface IIdentifierHelper
public boolean hasField(String fieldName)
IIdentifierHelper
IIdentifierDictionary.hasField(String)
.hasField
in interface IIdentifierHelper
fieldName
- The field name.fieldName
; False if not.public int getValue(IIdentifier compact, String field)
IIdentifierHelper
getValue
in interface IIdentifierHelper
compact
- The compact Identifier.field
- The field index in the dictionary.public IExpandedIdentifier createExpandedIdentifier()
createExpandedIdentifier
in interface IIdentifierHelper
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.