All Packages Class Hierarchy This Package Previous Next Index
Class macondo.mistero.SpaceName
macondo.mistero.SpaceName
- public class SpaceName
The name of a Space
object.
-
SpaceName()
- Default constructor.
-
buildItem(InputStream)
- JadaItem interface method.
-
cloneItem(Object)
- JadaItem interface method.
-
dumpItem(OutputStream)
- JadaItem interface method.
-
items()
- Returns the items of this name as an array of String.
-
join(String)
- Joins to the space specified from the given name items.
-
lastItem()
- Returns the last item of this name.
-
leave()
- Moves to the encompassing tuple space.
-
leaveAll()
- Moves to the root tuple space.
-
matchesItem(JadaItem)
- JadaItem interface method.
-
size()
- Returns the current number of items of this
SpaceName
.
-
startsWith(SpaceName)
- Tests if this name starts with the specified prexif.
-
toString()
- Returns a string representation of this
SpaceName
object.
SpaceName
public SpaceName()
- Default constructor.
join
public synchronized void join(String items)
- Joins to the space specified from the given name items.
- Parameters:
- items - the name items.
- See Also:
- join, leave, leaveAll
leave
public synchronized void leave()
- Moves to the encompassing tuple space.
- See Also:
- leave, join, leaveAll
leaveAll
public synchronized void leaveAll()
- Moves to the root tuple space.
- See Also:
- leaveAll, join, leave
toString
public synchronized String toString()
- Returns a string representation of this
SpaceName
object.
- Returns:
- a string representation of this
SpaceName
object.
size
public int size()
- Returns the current number of items of this
SpaceName
.
- Returns:
- the current number of items in this
SpaceName
.
startsWith
public synchronized boolean startsWith(SpaceName prefix)
- Tests if this name starts with the specified prexif.
- Parameters:
- prefix - the prefix.
- Returns:
-
true
if the string sequence represented
by the argument is a prefix of the string sequence
represented by this name; false
otherwise.
lastItem
public synchronized String lastItem()
- Returns the last item of this name.
- Returns:
- the last item of this name.
items
public synchronized String[] items()
- Returns the items of this name as an array of String.
- Returns:
- the name items as an array of String.
dumpItem
public void dumpItem(OutputStream os) throws ItemNotStreamableException, IOException
- JadaItem interface method.
Dumps this object to the specified stream.
- Parameters:
- os - the output stream.
- Throws: ItemNotStreamableException
- thrown if the object is not
streamable.
- Throws: IOException
- thrown if an I/O error
occurs.
buildItem
public void buildItem(InputStream is) throws ItemNotStreamableException, IOException
- JadaItem interface method.
Builds a
SpaceName
object from a stream.
- Parameters:
- is - the input stream.
- Throws: ItemNotStreamableException
- thrown if the object is not
streamable.
- Throws: IOException
- thrown if an I/O error
occurs.
cloneItem
public void cloneItem(Object source)
- JadaItem interface method.
Clone this object from another one.
- Parameters:
- source - the object to clone from.
matchesItem
public boolean matchesItem(JadaItem match)
- JadaItem interface method.
Tests if this object matches the given one.
- Parameters:
- match - the object to tests.
- Returns:
-
true
if the two object match,
false otherwise.
All Packages Class Hierarchy This Package Previous Next Index