/** * Returns {@code true} if this collection contains no elements. Invoking this method is more efficient * than testing {@code size() == 0} because this method does not iterate over all properties. */ @Override public boolean isEmpty() { return accessor.count(metadata, parent.table.valuePolicy, PropertyAccessor.COUNT_FIRST) == 0; }
/** * Returns the number of elements in this map. * The default implementation returns {@link PropertyAccessor#count()}, which is okay only if * all metadata defined by the standard are included in the map. Subclasses shall override * this method if their map contain only a subset of all possible metadata elements. */ @Override public int size() { return accessor.count(); }
/** * Returns {@code true} if this collection contains no elements. Invoking this method is more efficient * than testing {@code size() == 0} because this method does not iterate over all properties. */ @Override public boolean isEmpty() { return accessor.count(metadata, parent.table.valuePolicy, PropertyAccessor.COUNT_FIRST) == 0; }
/** * Returns {@code true} if this map contains no key-value mappings. */ @Override public boolean isEmpty() { return accessor.count(metadata, valuePolicy, PropertyAccessor.COUNT_FIRST) == 0; }
/** * Returns the number of elements in this map. */ @Override public int size() { return accessor.count(metadata, valuePolicy, PropertyAccessor.COUNT_SHALLOW); }
/** * Returns the number of elements in this map. * The default implementation returns {@link PropertyAccessor#count()}, which is okay only if * all metadata defined by the standard are included in the map. Subclasses shall override * this method if their map contain only a subset of all possible metadata elements. */ @Override public int size() { return accessor.count(); }
/** * Returns {@code true} if this map contains no key-value mappings. */ @Override public boolean isEmpty() { return accessor.count(metadata, valuePolicy, PropertyAccessor.COUNT_FIRST) == 0; }
/** * Returns the number of elements in this map. */ @Override public int size() { return accessor.count(metadata, valuePolicy, PropertyAccessor.COUNT_SHALLOW); }
@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); } };
/** * Returns the number of elements in this collection, * ignoring the {@link #isSkipped(Object) skipped} ones. */ @Override public int size() { int count = accessor.count(metadata, parent.table.valuePolicy, PropertyAccessor.COUNT_DEEP); if (titleProperty >= 0 && !isSkipped(valueAt(titleProperty))) count--; return count; }
/** * Returns the number of elements in this collection, * ignoring the {@link #isSkipped(Object) skipped} ones. */ @Override public int size() { int count = accessor.count(metadata, parent.table.valuePolicy, PropertyAccessor.COUNT_DEEP); if (titleProperty >= 0 && !isSkipped(valueAt(titleProperty))) count--; return count; }
/** * Moves {@link #next} to the first property with a valid value, * starting at the specified index. */ private void move(int index) { final int count = accessor.count(); while (index < count) { if (!valuePolicy.isSkipped(accessor.get(index, metadata))) { next = new Property(index); return; } index++; } next = null; }
/** * Moves {@link #next} to the first property with a valid value, * starting at the specified index. */ private void move(int index) { final int count = accessor.count(); while (index < count) { if (!valuePolicy.isSkipped(accessor.get(index, metadata))) { next = new Property(index); return; } index++; } next = null; }
return count();
this.metadata = metadata; this.accessor = accessor; this.children = new TreeNode[accessor.count()];
this.metadata = metadata; this.accessor = accessor; this.children = new TreeNode[accessor.count()];
assertEquals(umlIdentifier, elementType, accessor.type(index, TypeValuePolicy.ELEMENT_TYPE)); assertEquals("Count of 'get' methods.", i/6, accessor.count());
assertEquals("Deprecated property shall not be visible.", 1, accessor.count( instance, ValueExistencePolicy.NON_EMPTY, PropertyAccessor.COUNT_SHALLOW));