Package com.iizix.prop
Class Atom
java.lang.Object
com.iizix.prop.Atom
- All Implemented Interfaces:
Cloneable
,Comparable<Atom>
- Direct Known Subclasses:
GeneratedAtom
The
Atom
object instance is used to access the name string for e.g. properties. A name string that has been placed in an atom table is called an atom name.The name string is subject to the following name string rules:
- cannot be empty,
- code point for each character must be space or greater, i.e. no control characters,
- reserved characters: single- and double-quote, colon (:), forward and backslash (/\), curly brackets ({}) used in expressions, wild card characters (?*^), enumeration separators (,;).
The string itself is implemented as a weak reference, enabling the editor to keep a weak hash map with weak references.
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionstatic final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final String
Reserved characters in Atom names.static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
static final String
static final Atom
static final Atom
static final Atom
static final Atom
static final Atom
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones this atom.int
Compares this object with the specified object for order.static String
createValidName
(String string, boolean isLeadingDollarAllowed) Creates a valid name from a string.boolean
Checks if an atom equals to another.static Atom
Finds an atom that has been created previously by name, and that is still in use by some non-garbage-collected object.static Atom
Gets an existing or creates a new atom with the specified name.Gets the atom name.int
hashCode()
Gets the hash code of the Atom, i.e.static boolean
Checks if an Atom is present in an array of Atoms.static boolean
isValidName
(String name) Validates the atom name (apart of the leading '$' sign that should not be used unless for system defines).static boolean
isValidName
(String name, boolean allowLeadingDollar) Validates the atom name.toString()
Converts the atom to a string in the format ofatom[name]
.static String
validateName
(String name) Validates the atom name (apart of the leading '$' sign that should not be used unless for system defines).static String
validateName
(String name, boolean allowLeadingDollar) Validates the atom name (apart of the leading '$' sign that should not be used unless for system defines).
Field Details
RESERVED_CHARS
Reserved characters in Atom names.- See Also:
SYSTEM
SERVER
CLIENT
EVENT
ENV
HEADER
ERROR
INDEX
APPS
FILENAME
ROOT
ICON
BINDINGS
PORT
BIND
RESOLVE
HOST
SSL
PROXYHOST
PROXYPORT
PROXYTYPE
WEBSOCKET
USER
EXTENDS
STYLES
CLIENT_STYLES
SETTINGS
ROWS
RAW
NULL
ACTORS
PATTERN
FOCUS
TRANSACTION
CONNECTORS
TYPE
COMPONENTS
COMPONENT
UI_CONTAINER
UI_COMPONENT
UI_PREVIEW
VISIBLE
ENABLED
READONLY
SELECTED
SELECTOR
LAYOUT
LAYOUT_MANAGER
TEXT
CHARUPDATE
DATA_CONTAINER
PANEL
HSCROLL
VSCROLL
TITLE
TOOLTIP
MESSAGE
TOASTER
BADGE
POPUP
PLUGINS
CLASS
INPUT
BODY
OUTPUT
JAVA
TIMESTAMP
WIDTH
HEIGHT
FIELDS
CID
ID
IDS
ACTION
ACTIONS
ALIGN
RTL
LOCATION
DELAY
DERIVES
VSFIELD
VSTABLE
VSCOLUMN
QNAME
NAME
ENCODING
REFERENCE
VIRTUALSPACE
PARTICIPANTS
PRIMARY
VALUE
MSG
MCAT
DESCR
DEFAULT
GEO
ZONES
LANG
THEMES
DEVICE
URI
URI_PARAMS
METHOD
OVERRIDE_METHOD
READ_TIMEOUT
IGNORE
DOC
CACHE
STYLE
WEIGHT
RANGE
CONTEXT_MENU
CONTEXT_MENU_REF
DESIGNER
MODULE_APP
PWA
PUSH
ON_VS_CREATE
- See Also:
ON_VS_DESTROY
- See Also:
ON_VS_ACTION
- See Also:
ON_VS_CHANGE
- See Also:
ON_VS_FOCUS
- See Also:
ON_VS_STATE
- See Also:
ON_UI_CONNECT
- See Also:
ON_UI_CREATE
- See Also:
ON_UI_DESTROY
- See Also:
ON_UI_ACTION
- See Also:
ON_UI_BACK
- See Also:
ON_UI_TEXT_CHANGE
- See Also:
ON_UI_VALUE_CHANGE
- See Also:
ON_UI_FOCUS
- See Also:
ON_UI_SELECTION
- See Also:
ATOM_ON_VS_CREATE
ATOM_ON_VS_DESTROY
ATOM_ON_VS_ACTION
ATOM_ON_VS_CHANGE
ATOM_ON_VS_FOCUS
ATOM_ON_VS_STATE
ATOM_ON_UI_CONNECT
ATOM_ON_UI_CREATE
ATOM_ON_UI_DESTROY
ATOM_ON_UI_ACTION
ATOM_ON_UI_BACK
ATOM_ON_UI_TEXT_CHANGE
ATOM_ON_UI_VALUE_CHANGE
ATOM_ON_UI_FOCUS
ATOM_ON_UI_SELECTION
VSFIELD_NAME
- See Also:
Constructor Details
Atom
This method is ONLY intended to be used by GAtom!- Throws:
IllegalArgumentException
- If not internal...
Method Details
get
Gets an existing or creates a new atom with the specified name.- Parameters:
name
- The atom name, following the rules.- Throws:
NullPointerException
- If the name is null.IllegalArgumentException
- If the name is invalid.
find
Finds an atom that has been created previously by name, and that is still in use by some non-garbage-collected object.- Parameters:
name
- The name.- Returns:
- The Atom for the name, or null if not found.
isValidName
Validates the atom name (apart of the leading '$' sign that should not be used unless for system defines).- Parameters:
name
- The atom name to verify.- Returns:
- true for success, false for invalid name.
isValidName
Validates the atom name.- Parameters:
name
- The atom name to verify.allowLeadingDollar
- Flag indicating leading dollar is allowed or not.- Returns:
- true for success, false for invalid name.
validateName
Validates the atom name (apart of the leading '$' sign that should not be used unless for system defines).- Parameters:
name
- The atom name to verify.- Returns:
- The error message in English such as "cannot be empty" or "cannot contain...", or null for successful validation.
validateName
Validates the atom name (apart of the leading '$' sign that should not be used unless for system defines).- Parameters:
name
- The atom name to verify.allowLeadingDollar
- Flag indicating leading dollar is allowed or not.- Returns:
- The error message in English such as "cannot be empty" or "cannot contain...", or null for successful validation.
createValidName
Creates a valid name from a string. Only valid characters are used. If the name becomes empty, it will be returned as empty to be used for e.g. unique name creation, even if it is not allowed.- Parameters:
string
- The suggested name.isLeadingDollarAllowed
- Leading '$' is allowed depending on flag.
isInside
Checks if an Atom is present in an array of Atoms.- Parameters:
atom
- The atom to find.atoms
- The atom array.- Returns:
- true if atom found in the atoms table.
equals
Checks if an atom equals to another.compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfaceComparable<Atom>
- Parameters:
atom
- The object to be compared.- Returns:
- A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The comparison is done with a Collator with the Default Locale.
- Throws:
NullPointerException
- if the specified object is null.ClassCastException
- if the specified object's type prevents it from being compared to this object.
getAtomName
Gets the atom name.- Returns:
- the name of the atom.
toString
Converts the atom to a string in the format ofatom[name]
.hashCode
public int hashCode()Gets the hash code of the Atom, i.e. the hash code of the Atom Name.clone
Clones this atom.Atoms do not need cloning, and this method returns the same Atom object as the name is invariable.