wtanaka.praya.gale
Class SubscriptionList

java.lang.Object
  |
  +--wtanaka.praya.gale.SubscriptionList

public class SubscriptionList
extends java.lang.Object

A Subscription List container which supports set-like operations on subscription lists. You can think of simplifying subscription lists in at least two ways:

Return to Sourceforge or the Praya Homepage

Version:
$Name: $ $Date: 2001/09/30 21:14:52 $
Author:
$Author: wtanaka $

Field Summary
private  SubscriptionList m_simpleVersion
           
(package private)  java.lang.String[] m_subscriptions
           
 
Constructor Summary
  SubscriptionList()
          The empty subscription list.
  SubscriptionList(java.lang.String subs)
           
private SubscriptionList(java.lang.String[] subs)
           
 
Method Summary
private  java.lang.String concatenateWithSeparator(char separator)
           
 java.lang.String getOWOString()
           
 java.lang.String[] getSubscriptionArray()
           
 boolean matchesCategory(java.lang.String category)
           
private  void populateSimpleVersion()
           
 SubscriptionList simplify()
          Tries to simplify this subscription list into a shorter list which matches the same categories.
 SubscriptionList supersetWith(SubscriptionList list)
          Returns a superset of this subscription list combined with the one given passed as a parameter.
 java.lang.String toString()
           
 SubscriptionList withCategory(java.lang.String category)
          Returns a (possibly optimized) subscription list equivalent to this with ":category" appended to the end of it.
 SubscriptionList withoutCategory(java.lang.String category)
          Returns a (possibly optimized) subscription list equivalent to this with ":-category" appended to the end of it.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

m_subscriptions

java.lang.String[] m_subscriptions

m_simpleVersion

private volatile SubscriptionList m_simpleVersion
Constructor Detail

SubscriptionList

public SubscriptionList()
The empty subscription list.

SubscriptionList

public SubscriptionList(java.lang.String subs)

SubscriptionList

private SubscriptionList(java.lang.String[] subs)
Method Detail

getSubscriptionArray

public java.lang.String[] getSubscriptionArray()

concatenateWithSeparator

private java.lang.String concatenateWithSeparator(char separator)

getOWOString

public java.lang.String getOWOString()

matchesCategory

public boolean matchesCategory(java.lang.String category)

withCategory

public SubscriptionList withCategory(java.lang.String category)
Returns a (possibly optimized) subscription list equivalent to this with ":category" appended to the end of it.

withoutCategory

public SubscriptionList withoutCategory(java.lang.String category)
Returns a (possibly optimized) subscription list equivalent to this with ":-category" appended to the end of it.

supersetWith

public SubscriptionList supersetWith(SubscriptionList list)
Returns a superset of this subscription list combined with the one given passed as a parameter. The superset SS between two subscription lists S1 and S2 is defined as follows: (S1.matchesCategory(foo) || S2.matchesCategory (foo)) => SS.matchesCategory(foo)

populateSimpleVersion

private void populateSimpleVersion()

simplify

public SubscriptionList simplify()
Tries to simplify this subscription list into a shorter list which matches the same categories.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object