Author: | Baiju Muthukadan |
---|---|
Email: | baiju.m.mail AT gmail.com |
Version: | 0.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.gmu.mut; | |
import java.util.ArrayList; | |
import java.util.Calendar; | |
/** | |
* Class Account represents an immutable customer account. | |
*/ | |
public class Account { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.gmu.mut; | |
import java.util.ArrayList; | |
import java.util.Calendar; | |
/** | |
* Class Account represents an immutable customer account. | |
*/ | |
public class Account { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.gmu.mut.test; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import edu.gmu.mut.Account; | |
import edu.gmu.mut.Discount; | |
import edu.gmu.mut.GenreDiscount; | |
import edu.gmu.mut.LoyaltyDiscount; | |
import edu.gmu.mut.Purchase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.gmu.mut; | |
public class Loyalty { | |
/** | |
* Given a a number representing the total dollar amount | |
* of purchases, this returns some discount | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.gmu; | |
import java.util.List; | |
import org.apache.log4j.*; | |
public class Emailer { | |
public void sendEmail(List<Recipient> recipients, String message){ | |
EmailService service = new EmailService(); | |
service.connect(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cfcomponent { | |
public any function filter(string predicate, any collection){ | |
if( isArray(collection) ) return _filterArray(predicate,collection, [] ); | |
if( isStruct(collection) ) return _filterStruct(predicate,collection, {} ); | |
return collection; | |
} | |
//slightly different implementation for arrays | |
public any function _filterArray(string predicate, array collection, array accumulator){ |
layout | title | published | draft | draft_message | pub_date |
---|---|---|---|---|---|
post |
An Immutable Object Strategy in ColdFusion |
true |
false |
_DRAFT - Subject to change_ |
February 1, 2011 |
{% if page.draft } %(draft){{ page.draft_message }} {%endif%}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar E; | |
options { | |
backtrack = true; | |
memoize = true; | |
output = AST; | |
ASTLabelType = CommonTree; | |
} | |
tokens { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; TextPad keyword syntax file for CFML9 | |
; Author: virtix | |
; Feel free to distribute. | |
C=1 | |
[Syntax] | |
Namespace1 = 6 | |
IgnoreCase = Yes | |
KeyWordLength = 0 | |
BracketChars = []{} |