APIdia Launch Partner
Top Description Fields Constructors Methods
sun.awt.X11

pack-priv final Class XAtomList

extends Object
Class Inheritance
Imports
java.util.*

Helper class to ease the work with the lists of atoms.

Field Summary

Modifier and TypeField and Description
pack-priv Set<XAtom>

Constructor Summary

AccessConstructor and Description
public
XAtomList()

Creates empty list.

public
XAtomList(long data, int count)

Creates instance of XAtomList and initializes it with the contents pointer by data.

public
XAtomList(XAtom[] atoms)

Creates instance of XAtomList and initializes it with the arrays of atoms.

Method Summary

Modifier and TypeMethod and Description
public void
add(XAtom atom)

Add atom to the list.

public void
addAll(XAtomList atoms)

Merges without duplicates all the atoms from another list

public boolean
contains(XAtom atom)

Returns true if this list contains the atom atom

public XAtom[]
getAtoms()

Returns contents of the list as array of atoms.

public long
getAtomsData()

Returns contents of the list as pointer to native data The size of the native data is size of the list multiplied by size of the Atom type on the platform.

private void
init(long data, int count)

private void
init(XAtom[] atoms)

public Iterator<XAtom>
iterator()

Returns iterator for items.

public void
remove(XAtom atom)

Removes atom from the list.

public int
size()

Returns size of the list

public XAtomList
subset(int mask, Map<Integer, XAtom> mapping)

Returns a subset of a list which is intersection of this set and set build by mapping mask in mapping.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

atomsback to summary
pack-priv Set<XAtom> atoms

Constructor Detail

XAtomListback to summary
public XAtomList()

Creates empty list.

XAtomListback to summary
public XAtomList(long data, int count)

Creates instance of XAtomList and initializes it with the contents pointer by data. Uses default display to initialize atoms.

XAtomListback to summary
public XAtomList(XAtom[] atoms)

Creates instance of XAtomList and initializes it with the arrays of atoms. Array can contain null atoms.

Method Detail

addback to summary
public void add(XAtom atom)

Add atom to the list. Does nothing if list already contains this atom.

addAllback to summary
public void addAll(XAtomList atoms)

Merges without duplicates all the atoms from another list

containsback to summary
public boolean contains(XAtom atom)

Returns true if this list contains the atom atom

getAtomsback to summary
public XAtom[] getAtoms()

Returns contents of the list as array of atoms.

getAtomsDataback to summary
public long getAtomsData()

Returns contents of the list as pointer to native data The size of the native data is size of the list multiplied by size of the Atom type on the platform. Caller is responsible for freeing the data by Unsafe.freeMemory when it is no longer needed.

initback to summary
private void init(long data, int count)
initback to summary
private void init(XAtom[] atoms)
iteratorback to summary
public Iterator<XAtom> iterator()

Returns iterator for items.

removeback to summary
public void remove(XAtom atom)

Removes atom from the list. Does nothing if arrays doesn't contain this atom.

sizeback to summary
public int size()

Returns size of the list

subsetback to summary
public XAtomList subset(int mask, Map<Integer, XAtom> mapping)

Returns a subset of a list which is intersection of this set and set build by mapping mask in mapping.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override