/** * Returns the key corresponding to this entry. */ @Override public String getKey() { return accessor.name(index, keyPolicy); }
/** * The property identifier to be returned in the {@link TableColumn#IDENTIFIER} cells. */ @Override final String getIdentifier() { return accessor.name(indexInData, KeyNamePolicy.UML_IDENTIFIER); }
/** * The property identifier to be returned in the {@link TableColumn#IDENTIFIER} cells. */ @Override final String getIdentifier() { return accessor.name(indexInData, KeyNamePolicy.UML_IDENTIFIER); }
/** * Returns the key corresponding to this entry. */ @Override public String getKey() { return accessor.name(index, keyPolicy); }
@Override public Map.Entry<String,String> next() { final String value = accessor.name(index, valuePolicy); if (value == null) { // PropertyAccessor.name(int) never return null if the index is valid. throw new NoSuchElementException(); } return new SimpleImmutableEntry<>(accessor.name(index++, keyPolicy), value); } };
@Override public Map.Entry<String,String> next() { final String value = accessor.name(index, valuePolicy); if (value == null) { // PropertyAccessor.name(int) never return null if the index is valid. throw new NoSuchElementException(); } return new SimpleImmutableEntry<>(accessor.name(index++, keyPolicy), value); } };
@Override public Map.Entry<String,Integer> next() { final int i = index++; final String name = accessor.name(i, keyPolicy); if (name != null) { return new SimpleImmutableEntry<>(name, i); } throw new NoSuchElementException(); } };
@Override public Map.Entry<String,Integer> next() { final int i = index++; final String name = accessor.name(i, keyPolicy); if (name != null) { return new SimpleImmutableEntry<>(name, i); } throw new NoSuchElementException(); } };
/** * Appends an identifier for this node in the given buffer, for {@link #toString()} implementation. */ @Override void appendIdentifier(final StringBuilder buffer) { super.appendIdentifier(buffer); buffer.append('.').append(accessor.name(indexInData, KeyNamePolicy.JAVABEANS_PROPERTY)); }
@Override public Map.Entry<String,ExtendedElementInformation> next() { final ExtendedElementInformation value = accessor.information(index); if (value == null) { // PropertyAccessor.information(int) never return null if the index is valid. throw new NoSuchElementException(); } return new SimpleImmutableEntry<>(accessor.name(index++, keyPolicy), value); } };
/** * Returns the value to which the specified key is mapped, or {@code null} * if this map contains no mapping for the key. */ @Override public String get(final Object key) { if (key instanceof String) { return accessor.name(accessor.indexOf((String) key, false), valuePolicy); } return null; }
/** * Returns the value to which the specified key is mapped, or {@code null} * if this map contains no mapping for the key. */ @Override public String get(final Object key) { if (key instanceof String) { return accessor.name(accessor.indexOf((String) key, false), valuePolicy); } return null; }
/** * Appends an identifier for this node in the given buffer, for {@link #toString()} implementation. */ @Override void appendIdentifier(final StringBuilder buffer) { super.appendIdentifier(buffer); buffer.append('.').append(accessor.name(indexInData, KeyNamePolicy.JAVABEANS_PROPERTY)); }
@Override public Map.Entry<String,ExtendedElementInformation> next() { final ExtendedElementInformation value = accessor.information(index); if (value == null) { // PropertyAccessor.information(int) never return null if the index is valid. throw new NoSuchElementException(); } return new SimpleImmutableEntry<>(accessor.name(index++, keyPolicy), value); } };
@Override public Map.Entry<String,Class<?>> next() { if (index >= accessor.count()) { throw new NoSuchElementException(); } final Class<?> value = accessor.type(index, valuePolicy); return new SimpleImmutableEntry<String,Class<?>>(accessor.name(index++, keyPolicy), value); } };
@Override public Map.Entry<String,Class<?>> next() { if (index >= accessor.count()) { throw new NoSuchElementException(); } final Class<?> value = accessor.type(index, valuePolicy); return new SimpleImmutableEntry<>(accessor.name(index++, keyPolicy), value); } };
if (information == null) { final Class<?> elementType = elementTypes[index]; final String name = name(index, KeyNamePolicy.UML_IDENTIFIER); final Method getter = getters[index]; final ValueRange range;
if (information == null) { final Class<?> elementType = elementTypes[index]; final String name = name(index, KeyNamePolicy.UML_IDENTIFIER); final Method getter = getters[index]; final ValueRange range;
/** * Implementation of {@link #add(TreeTable.Node)}, also invoked by {@code TreeNode.NewChild}. * This method will attempt to convert the given {@code value} to the expected type. * * @param index the index in the accessor (<em>not</em> the index in this collection). * @param value the property value to add. * @return {@code true} if the metadata changed as a result of this method call. */ final boolean add(final int index, final Object value) throws IllegalStateException { if (ValueExistencePolicy.isNullOrEmpty(value)) { return false; } // Conversion attempt happen in the PropertyAccessor.set(…) method. final Boolean changed = (Boolean) accessor.set(index, metadata, value, PropertyAccessor.APPEND); if (changed == null) { throw new IllegalStateException(Errors.format(Errors.Keys.ValueAlreadyDefined_1, accessor.name(index, KeyNamePolicy.UML_IDENTIFIER))); } if (changed) { modCount++; } return changed; }
/** * Implementation of {@link #add(TreeTable.Node)}, also invoked by {@code TreeNode.NewChild}. * This method will attempt to convert the given {@code value} to the expected type. * * @param index the index in the accessor (<em>not</em> the index in this collection). * @param value the property value to add. * @return {@code true} if the metadata changed as a result of this method call. */ final boolean add(final int index, final Object value) throws IllegalStateException { if (ValueExistencePolicy.isNullOrEmpty(value)) { return false; } // Conversion attempt happen in the PropertyAccessor.set(…) method. final Boolean changed = (Boolean) accessor.set(index, metadata, value, PropertyAccessor.APPEND); if (changed == null) { throw new IllegalStateException(Errors.format(Errors.Keys.ValueAlreadyDefined_1, accessor.name(index, KeyNamePolicy.UML_IDENTIFIER))); } if (changed) { modCount++; } return changed; }