java/core/src/main/java/org/bondlib/SpecificTypeObjectBonded.java [81:92]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public <U extends BondSerializable> Bonded<U> convert(StructBondType<U> toBondType) {
        ArgumentHelper.ensureNotNull(toBondType, "toBondType");
        if (this.bondType.isSubtypeOf(toBondType)) {
            // we can always convert to a base struct type by upcasting
            @SuppressWarnings("unchecked")
            U castObjectInstance = (U) this.objectInstance;
            return new SpecificTypeObjectBonded<U>(castObjectInstance, toBondType);
        } else {
            // but we can't convert to any other type
            return null;
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/core/src/main/java/org/bondlib/WildcardTypeObjectBonded.java [92:103]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public <U extends BondSerializable> Bonded<U> convert(StructBondType<U> toBondType) {
        ArgumentHelper.ensureNotNull(toBondType, "toBondType");
        if (this.bondType.isSubtypeOf(toBondType)) {
            // we can always convert to a base struct type by upcasting
            @SuppressWarnings("unchecked")
            U castObjectInstance = (U) this.objectInstance;
            return new SpecificTypeObjectBonded<U>(castObjectInstance, toBondType);
        } else {
            // but we can't convert to any other type
            return null;
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



