bibliothek.gui.dock.station.support
Interface PlaceholderMap.Key

Enclosing class:
PlaceholderMap

public static interface PlaceholderMap.Key

A key is a set of Paths, it is used to identify entries in a PlaceholderMap.

Author:
Benjamin Sigg

Method Summary
 boolean contains(Path placeholder)
          Tells whether this key knows placeholder.
 String getAnchor()
          Gets the anchor.
 Path[] getPlaceholders()
          Gets the placeholders which make up this key.
 boolean isShared()
          Tells whether this key is shared.
 

Method Detail

getPlaceholders

Path[] getPlaceholders()
Gets the placeholders which make up this key.

Returns:
the placeholders, this array may be empty but not null

contains

boolean contains(Path placeholder)
Tells whether this key knows placeholder.

Parameters:
placeholder - the placeholder to search
Returns:
whether placeholder was found

getAnchor

String getAnchor()
Gets the anchor. If the anchor is set, then this key cannot be deleted even if all placeholders are no longer valid. No two keys may have the same anchor.

Returns:
the anchor, can be null

isShared

boolean isShared()
Tells whether this key is shared. Two shared keys are equal if they have the same array of placeholders, two non-shared keys are equal only if they are the same object, a shared and a non-shared key are never equal.

Returns:
whether this is a shared key