public class SimpleItem extends Object implements Item
Modifier and Type | Field and Description |
---|---|
protected static long |
serialVersionUID
For interoperability with possible future changes.
|
Constructor and Description |
---|
SimpleItem() |
SimpleItem(int reference,
String name,
String type,
boolean draft) |
SimpleItem(int reference,
String name,
String type,
String subType,
boolean draft) |
SimpleItem(int reference,
String name,
String type,
String subType,
boolean draft,
String description) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Item item) |
void |
addValidType(String validType) |
int |
compareTo(Item object)
Defines the order of a SimpleItem 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) |
String |
getDescription() |
String |
getName() |
int |
getReference() |
String |
getSubType() |
String |
getType() |
Collection |
getValidTypes() |
List |
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) |
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) |
protected static final long serialVersionUID
public SimpleItem()
public SimpleItem(int reference, String name, String type, String subType, boolean draft)
public int getReference()
getReference
in interface Item
public void setName(String name)
public void setType(String type)
type
- the type to setpublic 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 List 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
UnsupportedOperationException
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 © 2024 Denodo Technologies. All rights reserved.