de.tuberlin.cs.flp.jspwiki.plugin.wikiarchive
Class Archive

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.TreeMap
          extended byde.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.Archive
All Implemented Interfaces:
java.lang.Cloneable, java.util.Comparator, java.util.Map, java.io.Serializable, java.util.SortedMap

public class Archive
extends java.util.TreeMap
implements java.util.Comparator

An archive representation, that means a set of ArchiveEntrys together with a sort order.

See Also:
Serialized Form

Constructor Summary
Archive()
           
 
Method Summary
 void add(ArchiveEntry entry)
          Adds an entry to the archive.
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two ArhiveEntries with each other.
 java.util.Comparator getComparator()
          Returns the comparator to be used for comparing pairs of entries and building a sorted entry list.
 
Methods inherited from class java.util.TreeMap
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

Archive

public Archive()
Method Detail

add

public void add(ArchiveEntry entry)
Adds an entry to the archive.

Parameters:
entry - The entry.

getComparator

public java.util.Comparator getComparator()
Returns the comparator to be used for comparing pairs of entries and building a sorted entry list.

Returns:
This archive's default entry-comparator.

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two ArhiveEntries with each other. This is done based on an case-insensitive comparison of the entry-names.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - One ArchiveEntry.
o2 - Another ArchiveEntry.
Returns: