Class TypeSafetyAndValidationExample
java.lang.Object
de.pauleff.examples.TypeSafetyAndValidationExample
Demonstrates type safety and validation features of jNBT.
Key concepts:
- Type-safe getters return defaults instead of throwing exceptions
- List type enforcement prevents adding wrong types
- Data validation strategies for robust applications
- Error handling patterns
Always check hasTag() before accessing optional data.
Use type-safe getters to avoid ClassCastException.
- Author:
- Paul Ferlitz
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TypeSafetyAndValidationExample
public TypeSafetyAndValidationExample()
-
-
Method Details
-
main
- Throws:
IOException
-