Exemplo n.º 1
0
 /**
  * *****************************************************************************************************************
  *
  * <p>Adds a tag to this <code>Directory</code>.
  *
  * @param tag the tag to add
  *     <p>****************************************************************************************************************
  */
 public void addTag(@Nonnull final AbstractTag tag) {
   if (tag != null) {
     final int key = tag.getCode();
     tagMapByKey.put(tagRegistry.getKey(key), tag);
     keyList.add(tagRegistry.getKey(key));
   }
 }
Exemplo n.º 2
0
 /**
  * *****************************************************************************************************************
  *
  * <p>Removes a given tag from this </code>Directory</code>
  *
  * @param key the tag key
  * @return the remove tag
  *     <p>****************************************************************************************************************
  */
 @CheckForNull
 public AbstractTag removeTag(@Nonnull final Object key) {
   keyList.remove(tagRegistry.getKey(key));
   return tagMapByKey.remove(tagRegistry.getKey(key));
 }
Exemplo n.º 3
0
 /**
  * *****************************************************************************************************************
  *
  * <p>Checks if this <code>Directory</code> contains a given tag.
  *
  * @param key the tag key
  * @return true if this <code>Directory</code> contains the tag
  *     <p>****************************************************************************************************************
  */
 public boolean containsTag(@Nonnull final Object key) {
   return (tagRegistry != null) && tagMapByKey.containsKey(tagRegistry.getKey(key));
 }
Exemplo n.º 4
0
 /**
  * *****************************************************************************************************************
  *
  * <p>Retrieves a contained tag given its key.
  *
  * @param key the tag key
  *     <p>****************************************************************************************************************
  */
 @CheckForNull
 public AbstractTag getTag(@Nonnull final Object key) {
   return tagMapByKey.get(tagRegistry.getKey(key));
 }