public class L10nPathEntry extends java.lang.Object implements SecureExternalizable, java.lang.Comparable, java.io.Externalizable
Each entry defines a specific location or context where localization resources might be found. Instances of this class are designed to be sorted and uniquely identified based on their position and path.
Modifier and Type | Field and Description |
---|---|
static L10nPathEntry[] |
EMPTY_ARRAY |
Constructor and Description |
---|
L10nPathEntry()
Constructs a new, empty
L10nPathEntry instance. |
L10nPathEntry(java.lang.String _path,
int _position)
Constructs a new
L10nPathEntry with the specified path and position. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object other)
Compares this L10nPathEntry with the specified object for order.
|
java.lang.String |
getPath()
Returns the path string of this localization path entry.
|
int |
getPosition()
Returns the position of this localization path entry in the lookup order.
|
void |
readExternal(java.io.ObjectInput in)
Reads the state of this
L10nPathEntry instance from an ObjectInput stream. |
void |
readInstance(SecureObjectInputI in)
Reads the state of this
L10nPathEntry instance from a SecureObjectInputI stream. |
void |
writeExternal(java.io.ObjectOutput out)
Writes the state of this
L10nPathEntry instance to an ObjectOutput stream. |
void |
writeInstance(SecureObjectOutputI out)
Writes the state of this
L10nPathEntry instance to a SecureObjectOutputI stream. |
public static final L10nPathEntry[] EMPTY_ARRAY
public L10nPathEntry(java.lang.String _path, int _position)
L10nPathEntry
with the specified path and position.path
- The path String
for this localization path entry. Must not be null
.position
- The integer position of this entry in the localization lookup order.java.lang.IllegalArgumentException
- If the provided path
is null
.public L10nPathEntry()
L10nPathEntry
instance.
This no-argument constructor is specifically provided to facilitate instantiation
when objects of this class are read via the SecureExternalizable
interface.
It is typically invoked by the deserialization mechanism and should not be used for normal object creation,
as the fields will not be initialized until java.io.SecureExternalizable#readInstance(java.io.ObjectInput)
is called.
public java.lang.String getPath()
String
.public int getPosition()
public int compareTo(java.lang.Object other)
The natural sorting order for L10nPathEntry instances is defined as follows:
compareTo
in interface java.lang.Comparable
other
- The object to be compared. It is expected to be an instance of L10nPathEntry
.java.lang.ClassCastException
- if the specified object's type prevents it from being compared to this object.public void writeInstance(SecureObjectOutputI out) throws java.io.IOException
L10nPathEntry
instance to a SecureObjectOutputI
stream.
This method is part of the SecureExternalizable
contract.writeInstance
in interface SecureExternalizable
out
- The SecureObjectOutputI
stream to which the object's state will be written.IOException
- If an I/O error occurs during writing.public void readInstance(SecureObjectInputI in) throws java.io.IOException
L10nPathEntry
instance from a SecureObjectInputI
stream.
This method is part of the SecureExternalizable
contract and is responsible for
reconstructing the object's fields from the stream.readInstance
in interface SecureExternalizable
in
- The SecureObjectInputI
stream from which the object's state will be read.IOException
- If an I/O error occurs during reading.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
L10nPathEntry
instance to an ObjectOutput
stream.
This method is part of the Externalizable
contract.
It writes the path
as a UTF string and the position
as an integer.writeExternal
in interface java.io.Externalizable
out
- The ObjectOutput
stream to which the object's state will be written.IOException
- If an I/O error occurs during writing.public void readExternal(java.io.ObjectInput in) throws java.io.IOException
L10nPathEntry
instance from an ObjectInput
stream.
This method is part of the Externalizable
contract and is responsible for
reconstructing the object's fields from the stream.
It reads the path
as a UTF string and the position
as an integer.readExternal
in interface java.io.Externalizable
in
- The ObjectInput
stream from which the object's state will be read.IOException
- If an I/O error occurs during reading.Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.