public boolean IsContained ( String pFrom , String pTo ) { if ( periods == null ) { // echo "IsContained() TO BE IMPLEMENTED FLLKJ :: {{ } ''<br/>"; throw new RuntimeException ( "Error Periods is Null" ) ; } for ( int i = 0 ; i < periods . size ( ) ; i ++ ) { Period period = periods . get ( i ) ; if ( period . getFrom ( ) . compareTo ( pFrom ) > 0 ) return false ; if ( ( pFrom . compareTo ( period . getFrom ( ) ) >= 0 ) && ( pTo . compareTo ( period . getTo ( ) ) <= 0 ) ) return true ; } return false ; }
list of periods false if not