001
002 /*
003 * Copyright (C) 2011 Archie L. Cobbs. All rights reserved.
004 *
005 * $Id: PrimitiveSwitch.java 2 2011-02-05 21:51:43Z archie.cobbs $
006 */
007
008 package org.dellroad.stuff.java;
009
010 /**
011 * Visitor pattern interface for {@link Primitive}s.
012 *
013 * @param <R> switch method return type
014 */
015 public interface PrimitiveSwitch<R> {
016
017 R caseBoolean();
018
019 R caseByte();
020
021 R caseCharacter();
022
023 R caseShort();
024
025 R caseInteger();
026
027 R caseFloat();
028
029 R caseLong();
030
031 R caseDouble();
032 }
033