org.jasig.schedassist.model
Class AvailableBlock

java.lang.Object
  extended by org.jasig.schedassist.model.AvailableBlock
All Implemented Interfaces:
Serializable, Comparable<AvailableBlock>

public final class AvailableBlock
extends Object
implements Comparable<AvailableBlock>, Serializable

Representation of a block of availability. Constructor is package private, and should not be called in normal usage. Instead, use AvailableBlockBuilder. AvailableBlocks are immutable.

Version:
$Id: AvailableBlock.java 2335 2010-08-06 19:16:06Z npblair $
Author:
Nicholas Blair, nblair@doit.wisc.edu
See Also:
Serialized Form

Method Summary
 int compareTo(AvailableBlock o)
          Order of comparison: startTime endTime The visitorLimit and meetingLocation fields are immaterial to comparison.
 boolean equals(Object object)
           
 int getDurationInMinutes()
           
 Date getEndTime()
           
 String getMeetingLocation()
          Get the meetingLocation specified for this block.
 Date getStartTime()
           
 int getVisitorLimit()
           
 int getVisitorsAttending()
           
 int hashCode()
           
 void setVisitorsAttending(int visitorsAttending)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getEndTime

public Date getEndTime()
Returns:
the endTime

getStartTime

public Date getStartTime()
Returns:
the startTime

getVisitorLimit

public int getVisitorLimit()
Returns:
the visitorLimit

getMeetingLocation

public String getMeetingLocation()
Get the meetingLocation specified for this block. This may return null; in that case consumers should use the schedule owner's default meetingLocation (via preferences).

Returns:
the meetingLocation

getDurationInMinutes

public int getDurationInMinutes()
Returns:
the duration of this block in minutes

setVisitorsAttending

public void setVisitorsAttending(int visitorsAttending)
Parameters:
visitorsAttending -

getVisitorsAttending

public int getVisitorsAttending()
Returns:
the number of visitorsAttending (not always set)

compareTo

public int compareTo(AvailableBlock o)
Order of comparison:
  1. startTime
  2. endTime
The visitorLimit and meetingLocation fields are immaterial to comparison.

Specified by:
compareTo in interface Comparable<AvailableBlock>
See Also:
Comparable.compareTo(Object)

equals

public boolean equals(Object object)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2012 Jasig. All Rights Reserved.