/** * {@inheritDoc} */ @Override public int size() { return map.size(); }
/** * Detects whether there are no properties in the attribute object. * * @return <code>true</code> if the attribute object is empty, * <code>false</code> otherwise */ public boolean isEmpty() { // only entry is the owner? return (this.getCOSObject().size() == 1) && (this.getOwner() != null); }
/** * {@inheritDoc} */ @Override public int size() { return map.size(); }
/** * {@inheritDoc} */ @Override public int size() { return map.size(); }
/** * Constructor used by child classes * * @param dictionary pdfbox COSDictionary * @param type type of child class */ protected PBCosDict(COSDictionary dictionary, final String type, final PDDocument document, final PDFAFlavour flavour) { super(dictionary, type); this.size = dictionary.size(); this.document = document; this.flavour = flavour; }
retval = ((COSDictionary)parent).size();
result = "(" + dict.size() + ")";
if (dic.size() > MAX_DICT_ENTRIES)
@Override protected int getKey(PDShading obj) { return obj.getCOSObject().size(); } }
@Override protected int getKey(PDExtendedGraphicsState obj) { return obj.getCOSObject().size(); } }
/** * Get all values of the dictionary */ private List<CosObject> getValues() { COSDictionary dictionary = (COSDictionary) this.baseObject; List<CosObject> list = new ArrayList<>(dictionary.size()); for (COSBase value : dictionary.getValues()) { if (value != null) { list.add(getFromValue(value, this.document, this.flavour)); } } return Collections.unmodifiableList(list); }
/** * Get all keys of the dictionary */ private List<CosName> getKeys() { COSDictionary dictionary = (COSDictionary) this.baseObject; List<CosName> list = new ArrayList<>(dictionary.size()); for (COSName key : dictionary.keySet()) { if (key != null) { list.add((CosName) getFromValue(key, this.document, this.flavour)); } } return Collections.unmodifiableList(list); }
private static boolean equalsCOSDictionary(COSDictionary cosDictionary, COSDictionary cosDictionary1) { if (cosDictionary.size() != cosDictionary1.size()) return false; for (COSName name : cosDictionary.keySet()) { COSBase item = cosDictionary.getItem(name); COSBase item2 = cosDictionary1.getItem(name); if (!equalsCOSBase(item, item2)) return false; } return true; }
/** * Detects whether there are no properties in the attribute object. * * @return <code>true</code> if the attribute object is empty, * <code>false</code> otherwise */ public boolean isEmpty() { // only entry is the owner? return (this.getCOSObject().size() == 1) && (this.getOwner() != null); }
/** * Detects whether there are no properties in the attribute object. * * @return <code>true</code> if the attribute object is empty, * <code>false</code> otherwise */ public boolean isEmpty() { // only entry is the owner? return (this.getCOSObject().size() == 1) && (this.getOwner() != null); }
private List<PDSeparation> getColorants(COSDictionary colorantsDict) { ArrayList<PDSeparation> list = new ArrayList<>(colorantsDict.size()); for (COSBase value : colorantsDict.getValues()) { try { org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace = org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(value); if (colorSpace instanceof org.apache.pdfbox.pdmodel.graphics.color.PDSeparation) { list.add((PBoxPDSeparation) ColorSpaceFactory.getColorSpace(colorSpace, this.document, this.flavour)); } } catch (IOException e) { LOGGER.debug("Problems with color space obtain.", e); } } return Collections.unmodifiableList(list); } }
if (dic.size() > MAX_DICT_ENTRIES)
if (dic.size() > MAX_DICT_ENTRIES)