001 package com.croftsoft.core.util.consumer; 002 003 /*********************************************************************** 004 * A singleton null object implementation of a Consumer. 005 * 006 * @version 007 * $Id: NullConsumer.java,v 1.3 2008/09/20 05:01:27 croft Exp $ 008 * @since 009 * 2003-06-10 010 * @author 011 * <a href="https://www.croftsoft.com/">David Wallace Croft</a> 012 ***********************************************************************/ 013 014 public final class NullConsumer 015 implements Consumer 016 //////////////////////////////////////////////////////////////////////// 017 //////////////////////////////////////////////////////////////////////// 018 { 019 020 /** singleton instance */ 021 public static final NullConsumer INSTANCE = new NullConsumer ( ); 022 023 //////////////////////////////////////////////////////////////////////// 024 //////////////////////////////////////////////////////////////////////// 025 026 public void consume ( Object o ) 027 //////////////////////////////////////////////////////////////////////// 028 { 029 // empty 030 } 031 032 //////////////////////////////////////////////////////////////////////// 033 // private constructor method 034 //////////////////////////////////////////////////////////////////////// 035 036 private NullConsumer ( ) 037 //////////////////////////////////////////////////////////////////////// 038 { 039 // empty 040 } 041 042 //////////////////////////////////////////////////////////////////////// 043 //////////////////////////////////////////////////////////////////////// 044 }