org.apache.hivemind.definition
Class Occurances

java.lang.Object
  extended by org.apache.hivemind.definition.Occurances

public abstract class Occurances
extends java.lang.Object

Identifies the number of contributions allowed to a configuration extension point.

Author:
Howard Lewis Ship

Field Summary
static Occurances NONE
           
static Occurances ONE_PLUS
          At least one is required.
static Occurances OPTIONAL
          Optional, may be zero or one, but not more.
static Occurances REQUIRED
          Exactly one is required.
static Occurances UNBOUNDED
          An unbounded number, zero or more.
 
Method Summary
 java.lang.String getName()
           
abstract  boolean inRange(int count)
          Validates that an actual count is in range for the particular Occurances count.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNBOUNDED

public static final Occurances UNBOUNDED
An unbounded number, zero or more.


OPTIONAL

public static final Occurances OPTIONAL
Optional, may be zero or one, but not more.


REQUIRED

public static final Occurances REQUIRED
Exactly one is required.


ONE_PLUS

public static final Occurances ONE_PLUS
At least one is required.


NONE

public static final Occurances NONE
Method Detail

getName

public java.lang.String getName()

toString

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

inRange

public abstract boolean inRange(int count)
Validates that an actual count is in range for the particular Occurances count.

Parameters:
count - the number of items to check. Should be zero or greater.
Returns:
true if count is a valid number in accordance to the range, false otherwise


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.