Class BoolValue
java.lang.Object
com.iohao.net.framework.protocol.wrapper.BoolValue
Protocol wrapper for a single boolean value.
Wraps a primitive boolean for protobuf serialization, allowing it to be used
as a parameter or return type in @ActionMethod handlers. Instances for
true and false are cached and reused via the factory methods.
- Author:
- 渔民小镇
- date:
- 2023-02-07
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
value
@Protobuf(fieldType=BOOL, order=1) public boolean value
-
-
Constructor Details
-
BoolValue
public BoolValue()
-
-
Method Details
-
of
Return a cached BoolValue for the given boolean.- Parameters:
value- the boolean value- Returns:
- the cached BoolValue instance
-
ofTrue
Return the cached BoolValue fortrue.- Returns:
- the true BoolValue instance
-
ofFalse
Return the cached BoolValue forfalse.- Returns:
- the false BoolValue instance
-
toString
-