Package org.dellroad.stuff.java
Class PrimitiveSwitchAdapter<R>
java.lang.Object
org.dellroad.stuff.java.PrimitiveSwitchAdapter<R>
- Type Parameters:
R- switch method return type
- All Implemented Interfaces:
PrimitiveSwitch<R>
Adapter class for
PrimitiveSwitch implementations.- Since:
- 1.0.65
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionHandle thePrimitive.BOOLEANcase.caseByte()Handle thePrimitive.BYTEcase.Handle thePrimitive.CHARACTERcase.protected RInternal roll-up method.Handle thePrimitive.DOUBLEcase.Handle thePrimitive.FLOATcase.Handle thePrimitive.INTEGERcase.caseLong()Handle thePrimitive.LONGcase.protected RInternal roll-up method.Handle thePrimitive.SHORTcase.caseVoid()Handle thePrimitive.VOIDcase.
-
Constructor Details
-
PrimitiveSwitchAdapter
public PrimitiveSwitchAdapter()
-
-
Method Details
-
caseVoid
Handle thePrimitive.VOIDcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseDefault().- Specified by:
caseVoidin interfacePrimitiveSwitch<R>
-
caseBoolean
Handle thePrimitive.BOOLEANcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseDefault().- Specified by:
caseBooleanin interfacePrimitiveSwitch<R>
-
caseByte
Handle thePrimitive.BYTEcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseNumber().- Specified by:
caseBytein interfacePrimitiveSwitch<R>
-
caseCharacter
Handle thePrimitive.CHARACTERcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseDefault().- Specified by:
caseCharacterin interfacePrimitiveSwitch<R>
-
caseShort
Handle thePrimitive.SHORTcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseNumber().- Specified by:
caseShortin interfacePrimitiveSwitch<R>
-
caseInteger
Handle thePrimitive.INTEGERcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseNumber().- Specified by:
caseIntegerin interfacePrimitiveSwitch<R>
-
caseFloat
Handle thePrimitive.FLOATcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseNumber().- Specified by:
caseFloatin interfacePrimitiveSwitch<R>
-
caseLong
Handle thePrimitive.LONGcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseNumber().- Specified by:
caseLongin interfacePrimitiveSwitch<R>
-
caseDouble
Handle thePrimitive.DOUBLEcase. The implementation inPrimitiveSwitchAdapterdelegates tocaseNumber().- Specified by:
caseDoublein interfacePrimitiveSwitch<R>
-
caseNumber
Internal roll-up method. The implementation inPrimitiveSwitchAdapterdelegates tocaseDefault().- Returns:
- default result for sub-types of
Number
-
caseDefault
Internal roll-up method. The implementation inPrimitiveSwitchAdapterreturnsnull.- Returns:
- default result
-