Lines Matching defs:item

37  * <b>Note:</b> It is invalid for an item in an instance of this class to
113 public int getAbsoluteItemOffset(Item item) {
114 OffsettedItem oi = (OffsettedItem) item;
162 * Adds an item to this instance. This will in turn tell the given item
164 * same item to more than one instance, nor to add the same items
167 * @param item {@code non-null;} the item to add
169 public void add(OffsettedItem item) {
173 if (item.getAlignment() > getAlignment()) {
175 "incompatible item alignment");
179 throw new NullPointerException("item == null");
182 items.add(item);
186 * Interns an item in this instance, returning the interned instance
187 * (which may not be the one passed in). This will add the item if no
188 * equal item has been added.
190 * @param item {@code non-null;} the item to intern
193 public synchronized <T extends OffsettedItem> T intern(T item) {
196 OffsettedItem result = interns.get(item);
202 add(item);
203 interns.put(item, item);
204 return item;
208 * Gets an item which was previously interned.
210 * @param item {@code non-null;} the item to look for
213 public <T extends OffsettedItem> T get(T item) {
216 OffsettedItem result = interns.get(item);
222 throw new NoSuchElementException(item.toString());
231 * @param itemType {@code non-null;} the item type of interest
241 for (OffsettedItem item : items) {
242 if (item.itemType() == itemType) {
243 String label = item.toHuman();
244 index.put(label, item);
256 OffsettedItem item = entry.getValue();
257 out.annotate(0, item.offsetString() + ' ' + label + '\n');
287 * will call {@link OffsettedItem#place} on each item. If an item