public class CompoundItem extends Object implements Item
Modifier and Type | Field and Description |
---|---|
protected static long |
serialVersionUID
For interoperability with possible future changes.
|
Constructor and Description |
---|
CompoundItem() |
CompoundItem(int reference,
String name,
String type,
boolean draft,
Collection validTypes) |
CompoundItem(int reference,
String name,
String type,
String subType,
boolean draft,
Collection validTypes) |
CompoundItem(int reference,
String name,
String type,
String subType,
boolean draft,
String description,
Collection values,
Collection validTypes) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Item item)
Adds a new item by passing the request (add) along
the item structure until an object handles it: when
isValidType of item type is true.
|
void |
addValidType(String validType) |
int |
compareTo(Item object)
Defines the order of a CompoundItem in a Collection: its names appears in
alphabetic order grouped by type and subtype.
|
boolean |
equals(Object object)
Returns whether an instance of this class is equals to the one passed
as a parameter or not.
|
Item |
find(int itemRef)
Finds the given item by passing the request (find) along
the item structure until an object handles it: when the item is
itself or a direct descendant.
|
String |
getDescription() |
String |
getName() |
int |
getReference() |
String |
getSubType() |
String |
getType() |
Collection |
getValidTypes() |
Collection |
getValues() |
int |
hashCode()
Returns the hash code of an instance of this class.
|
boolean |
isDraft() |
boolean |
isEmpty() |
boolean |
isValidType(String valueType) |
boolean |
remove(int itemRef)
Removes the given item by passing the request (remove) along
the item structure until an object handles it: when the item is
a direct descendant.
|
void |
setDescription(String description) |
void |
setDraft(boolean draft) |
void |
setName(String name) |
void |
setSubType(String subType) |
void |
setType(String type) |
String |
toString() |
boolean |
update(int itemRef,
Item item)
Updates the given item by passing the request (update) along
the item structure until an object handles it: when the item is
a direct descendant.
|
protected static final long serialVersionUID
public CompoundItem()
public CompoundItem(int reference, String name, String type, boolean draft, Collection validTypes)
public CompoundItem(int reference, String name, String type, String subType, boolean draft, Collection validTypes)
public CompoundItem(int reference, String name, String type, String subType, boolean draft, String description, Collection values, Collection validTypes)
public int getReference()
getReference
in interface Item
public void setType(String type)
type
- the type to setpublic void setName(String name)
public String getSubType()
getSubType
in interface Item
public void setSubType(String subType)
subType
- the subType to setpublic void setDraft(boolean draft)
public String getDescription()
getDescription
in interface Item
public void setDescription(String description)
setDescription
in interface Item
description
- the description to setpublic boolean add(Item item)
public Item find(int itemRef)
public boolean update(int itemRef, Item item)
public boolean remove(int itemRef)
public Collection getValues()
public void addValidType(String validType)
addValidType
in interface Item
public boolean isValidType(String valueType)
isValidType
in interface Item
public Collection getValidTypes()
getValidTypes
in interface Item
public int hashCode()
public boolean equals(Object object)
public int compareTo(Item object)
Collator
of TERTIARY
strength dependent
on the configured locales is used.compareTo
in interface Comparable<Item>
Copyright © 2025 Denodo Technologies. All rights reserved.