@Override public boolean isCompatibleWith(AbstractType<?> previous) { if (!(previous instanceof ColumnToCollectionType)) return false; ColumnToCollectionType prev = (ColumnToCollectionType)previous; // We are compatible if we have all the definitions previous have (but we can have more). for (Map.Entry<ByteBuffer, CollectionType> entry : prev.defined.entrySet()) { CollectionType newType = defined.get(entry.getKey()); if (newType == null || !newType.isCompatibleWith(entry.getValue())) return false; } return true; }
@Override public boolean isCompatibleWith(AbstractType<?> previous) { if (!(previous instanceof ColumnToCollectionType)) return false; ColumnToCollectionType prev = (ColumnToCollectionType)previous; // We are compatible if we have all the definitions previous have (but we can have more). for (Map.Entry<ByteBuffer, CollectionType> entry : prev.defined.entrySet()) { CollectionType newType = defined.get(entry.getKey()); if (newType == null || !newType.isCompatibleWith(entry.getValue())) return false; } return true; }
@Override public boolean isCompatibleWith(AbstractType<?> previous) { if (!(previous instanceof ColumnToCollectionType)) return false; ColumnToCollectionType prev = (ColumnToCollectionType)previous; // We are compatible if we have all the definitions previous have (but we can have more). for (Map.Entry<ByteBuffer, CollectionType> entry : prev.defined.entrySet()) { CollectionType newType = defined.get(entry.getKey()); if (newType == null || !newType.isCompatibleWith(entry.getValue())) return false; } return true; }
@Override public boolean isCompatibleWith(AbstractType<?> previous) { if (!(previous instanceof ColumnToCollectionType)) return false; ColumnToCollectionType prev = (ColumnToCollectionType)previous; // We are compatible if we have all the definitions previous have (but we can have more). for (Map.Entry<ByteBuffer, CollectionType> entry : prev.defined.entrySet()) { CollectionType newType = defined.get(entry.getKey()); if (newType == null || !newType.isCompatibleWith(entry.getValue())) return false; } return true; }
@Override public boolean isCompatibleWith(AbstractType<?> previous) { if (!(previous instanceof ColumnToCollectionType)) return false; ColumnToCollectionType prev = (ColumnToCollectionType)previous; // We are compatible if we have all the definitions previous have (but we can have more). for (Map.Entry<ByteBuffer, CollectionType> entry : prev.defined.entrySet()) { CollectionType newType = defined.get(entry.getKey()); if (newType == null || !newType.isCompatibleWith(entry.getValue())) return false; } return true; }
@Override public boolean isValueCompatibleWithInternal(AbstractType<?> previous) { // for multi-cell collections, compatibility and value-compatibility are the same if (this.isMultiCell()) return isCompatibleWith(previous); if (this == previous) return true; if (!getClass().equals(previous.getClass())) return false; CollectionType tprev = (CollectionType) previous; if (this.isMultiCell() != tprev.isMultiCell()) return false; // subclasses should handle compatibility checks for frozen collections return isValueCompatibleWithFrozen(tprev); }
@Override public boolean isValueCompatibleWithInternal(AbstractType<?> previous) { // for multi-cell collections, compatibility and value-compatibility are the same if (this.isMultiCell()) return isCompatibleWith(previous); if (this == previous) return true; if (!getClass().equals(previous.getClass())) return false; CollectionType tprev = (CollectionType) previous; if (this.isMultiCell() != tprev.isMultiCell()) return false; // subclasses should handle compatibility checks for frozen collections return isValueCompatibleWithFrozen(tprev); }
@Override public boolean isValueCompatibleWithInternal(AbstractType<?> previous) { // for multi-cell collections, compatibility and value-compatibility are the same if (this.isMultiCell()) return isCompatibleWith(previous); if (this == previous) return true; if (!getClass().equals(previous.getClass())) return false; CollectionType tprev = (CollectionType) previous; if (this.isMultiCell() != tprev.isMultiCell()) return false; // subclasses should handle compatibility checks for frozen collections return isValueCompatibleWithFrozen(tprev); }
@Override public boolean isValueCompatibleWithInternal(AbstractType<?> previous) { // for multi-cell collections, compatibility and value-compatibility are the same if (this.isMultiCell()) return isCompatibleWith(previous); if (this == previous) return true; if (!getClass().equals(previous.getClass())) return false; CollectionType tprev = (CollectionType) previous; if (this.isMultiCell() != tprev.isMultiCell()) return false; // subclasses should handle compatibility checks for frozen collections return isValueCompatibleWithFrozen(tprev); }
@Override public boolean isValueCompatibleWithInternal(AbstractType<?> previous) { // for multi-cell collections, compatibility and value-compatibility are the same if (this.isMultiCell()) return isCompatibleWith(previous); if (this == previous) return true; if (!getClass().equals(previous.getClass())) return false; CollectionType tprev = (CollectionType) previous; if (this.isMultiCell() != tprev.isMultiCell()) return false; // subclasses should handle compatibility checks for frozen collections return isValueCompatibleWithFrozen(tprev); }