Class IdentifierRelation
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.UntypedData
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.IdentifierRelation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<UntypedData>
,java.lang.Iterable<Identifier>
,java.util.Collection<Identifier>
,java.util.Set<Identifier>
,java.util.SortedSet<Identifier>
public class IdentifierRelation extends UntypedData implements java.util.SortedSet<Identifier>
Collection of untyped relations to otherMetaData
objects.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.UntypedData
ALL_RIGHTS_RESERVED, EMPTY, string
-
-
Constructor Summary
Constructors Constructor Description IdentifierRelation()
Construct an IdentifierRelation with an empty list of relations.
-
Method Summary
Modifier and Type Method Description boolean
add(Identifier identifier)
Add aIdentifier
to thisIdentifierRelation
set.boolean
addAll(java.util.Collection<? extends Identifier> collection)
Identifier
ceiling(Identifier identifier)
void
clear()
Clear theIdentifierRelation
Set
.java.lang.Object
clone()
java.util.Comparator<? super Identifier>
comparator()
int
compareTo(UntypedData datatype)
boolean
contains(java.lang.Object object)
Check if an theObject
is in theIdentifierRelation
set.boolean
containsAll(java.util.Collection<?> c)
Check if an theCollection
is in theIdentifierRelation
set.java.util.Iterator<Identifier>
descendingIterator()
java.util.NavigableSet<Identifier>
descendingSet()
boolean
equals(java.lang.Object o)
Identifier
first()
Identifier
floor(Identifier identifier)
java.util.Collection<Identifier>
getRelations()
Getter for the field_relations
.int
hashCode()
java.util.SortedSet<Identifier>
headSet(Identifier toElement)
java.util.NavigableSet<Identifier>
headSet(Identifier toElement, boolean inclusive)
Identifier
higher(Identifier identifier)
boolean
isEmpty()
Check if theCollection
ofIdentifierRelation
is empty.java.util.Iterator<Identifier>
iterator()
Iterator for theCollection
ofIdentifierRelation
.Identifier
last()
Identifier
lower(Identifier identifier)
Identifier
pollFirst()
Identifier
pollLast()
boolean
remove(java.lang.Object o)
Remove theObject
from theIdentifierRelation
set.boolean
removeAll(java.util.Collection<?> c)
Remove theCollection
from theIdentifierRelation
set.boolean
retainAll(java.util.Collection<?> c)
Retains only the object in theCollection
in theIdentifierRelation
set.void
setRelations(java.util.TreeSet<Identifier> relations)
Setter for the field_relations
.int
size()
Get the size of theIdentifierRelation
Collection
.java.util.NavigableSet<Identifier>
subSet(Identifier fromElement, boolean fromInclusive, Identifier toElement, boolean toInclusive)
java.util.SortedSet<Identifier>
subSet(Identifier fromElement, Identifier toElement)
java.util.SortedSet<Identifier>
tailSet(Identifier fromElement)
java.util.NavigableSet<Identifier>
tailSet(Identifier fromElement, boolean inclusive)
java.lang.Object[]
toArray()
Convert theCollection
to an array ofObject
s.<T> T[]
toArray(T[] a)
Convert theCollection
to an array of T objects.java.lang.String
toString()
-
Methods inherited from class de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.UntypedData
getString, setString, toHTML
-
-
-
-
Method Detail
-
add
public boolean add(Identifier identifier)
Add aIdentifier
to thisIdentifierRelation
set.- Specified by:
add
in interfacejava.util.Collection<Identifier>
- Specified by:
add
in interfacejava.util.Set<Identifier>
- Parameters:
identifier
- the identifier to add- Returns:
true
if successful;false
otherwise.- See Also:
Collection.add(java.lang.Object)
-
addAll
public boolean addAll(java.util.Collection<? extends Identifier> collection)
- Specified by:
addAll
in interfacejava.util.Collection<Identifier>
- Specified by:
addAll
in interfacejava.util.Set<Identifier>
- Parameters:
collection
- the collection of identifiers to add- Returns:
true
if successful;false
otherwise.- See Also:
Collection.addAll(java.util.Collection)
-
ceiling
public Identifier ceiling(Identifier identifier)
- Parameters:
identifier
- to identifier to match- Returns:
Identifier
- See Also:
TreeSet.ceiling(java.lang.Object)
-
clear
public void clear()
Clear theIdentifierRelation
Set
.- Specified by:
clear
in interfacejava.util.Collection<Identifier>
- Specified by:
clear
in interfacejava.util.Set<Identifier>
- See Also:
Collection.clear()
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
- Returns:
Object
- See Also:
TreeSet.clone()
-
comparator
public java.util.Comparator<? super Identifier> comparator()
- Specified by:
comparator
in interfacejava.util.SortedSet<Identifier>
- Returns:
Comparator
ofIdentifier
- See Also:
TreeSet.comparator()
-
compareTo
public int compareTo(UntypedData datatype)
- Specified by:
compareTo
in interfacejava.lang.Comparable<UntypedData>
- Overrides:
compareTo
in classUntypedData
-
contains
public boolean contains(java.lang.Object object)
Check if an theObject
is in theIdentifierRelation
set.- Specified by:
contains
in interfacejava.util.Collection<Identifier>
- Specified by:
contains
in interfacejava.util.Set<Identifier>
- Parameters:
object
- to object to check- Returns:
true
if the theSet
contains the object;false
otherwise.- See Also:
Collection.contains(java.lang.Object)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
Check if an theCollection
is in theIdentifierRelation
set.- Specified by:
containsAll
in interfacejava.util.Collection<Identifier>
- Specified by:
containsAll
in interfacejava.util.Set<Identifier>
- Returns:
true
if the theSet
contains theCollection
;false
otherwise.
-
descendingIterator
public java.util.Iterator<Identifier> descendingIterator()
- Returns:
Iterator
ofIdentifier
- See Also:
TreeSet.descendingIterator()
-
descendingSet
public java.util.NavigableSet<Identifier> descendingSet()
- Returns:
NavigableSet
ofIdentifier
- See Also:
TreeSet.descendingSet()
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.util.Collection<Identifier>
- Specified by:
equals
in interfacejava.util.Set<Identifier>
- Overrides:
equals
in classUntypedData
-
first
public Identifier first()
- Specified by:
first
in interfacejava.util.SortedSet<Identifier>
- Returns:
- first
Identifier
- See Also:
TreeSet.first()
-
floor
public Identifier floor(Identifier identifier)
- Parameters:
identifier
- the identifier to match- Returns:
Identifier
- See Also:
TreeSet.floor(java.lang.Object)
-
getRelations
public java.util.Collection<Identifier> getRelations()
Getter for the field_relations
.- Returns:
- the _relations
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<Identifier>
- Specified by:
hashCode
in interfacejava.util.Set<Identifier>
- Overrides:
hashCode
in classUntypedData
-
headSet
public java.util.SortedSet<Identifier> headSet(Identifier toElement)
- Specified by:
headSet
in interfacejava.util.SortedSet<Identifier>
- Parameters:
toElement
- the identifier to match- Returns:
SortedSet
ofIdentifier
- See Also:
TreeSet.headSet(java.lang.Object)
-
headSet
public java.util.NavigableSet<Identifier> headSet(Identifier toElement, boolean inclusive)
- Parameters:
toElement
- the identifier to matchinclusive
- if inclusive or not- Returns:
NavigableSet
ofIdentifier
- See Also:
TreeSet.headSet(java.lang.Object, boolean)
-
higher
public Identifier higher(Identifier identifier)
- Parameters:
identifier
- the identifier to match- Returns:
Identifier
- See Also:
TreeSet.higher(java.lang.Object)
-
isEmpty
public boolean isEmpty()
Check if theCollection
ofIdentifierRelation
is empty.- Specified by:
isEmpty
in interfacejava.util.Collection<Identifier>
- Specified by:
isEmpty
in interfacejava.util.Set<Identifier>
- Returns:
true
ifCollection
is empty;false
otherwise.- See Also:
Collection.isEmpty()
-
iterator
public java.util.Iterator<Identifier> iterator()
Iterator for theCollection
ofIdentifierRelation
.- Specified by:
iterator
in interfacejava.util.Collection<Identifier>
- Specified by:
iterator
in interfacejava.lang.Iterable<Identifier>
- Specified by:
iterator
in interfacejava.util.Set<Identifier>
- Returns:
- the
Iterator
- See Also:
Collection.iterator()
-
last
public Identifier last()
- Specified by:
last
in interfacejava.util.SortedSet<Identifier>
- Returns:
- last
Identifier
- See Also:
TreeSet.last()
-
lower
public Identifier lower(Identifier identifier)
- Parameters:
identifier
- the identifier to match- Returns:
Identifier
- See Also:
TreeSet.lower(java.lang.Object)
-
pollFirst
public Identifier pollFirst()
- Returns:
Identifier
- See Also:
TreeSet.pollFirst()
-
pollLast
public Identifier pollLast()
- Returns:
Identifier
- See Also:
TreeSet.pollLast()
-
remove
public boolean remove(java.lang.Object o)
Remove theObject
from theIdentifierRelation
set.- Specified by:
remove
in interfacejava.util.Collection<Identifier>
- Specified by:
remove
in interfacejava.util.Set<Identifier>
- Returns:
true
if successful;false
otherwise.
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
Remove theCollection
from theIdentifierRelation
set.- Specified by:
removeAll
in interfacejava.util.Collection<Identifier>
- Specified by:
removeAll
in interfacejava.util.Set<Identifier>
- Returns:
true
if successful;false
otherwise.
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
Retains only the object in theCollection
in theIdentifierRelation
set. Removes all otherObject
s from theIdentifierRelation
set.- Specified by:
retainAll
in interfacejava.util.Collection<Identifier>
- Specified by:
retainAll
in interfacejava.util.Set<Identifier>
- Returns:
true
if successful;false
otherwise.
-
setRelations
public void setRelations(java.util.TreeSet<Identifier> relations)
Setter for the field_relations
.- Parameters:
relations
- the _relations to set
-
size
public int size()
Get the size of theIdentifierRelation
Collection
.- Specified by:
size
in interfacejava.util.Collection<Identifier>
- Specified by:
size
in interfacejava.util.Set<Identifier>
- Returns:
- size the size of the relation collection
- See Also:
Set.size()
-
subSet
public java.util.NavigableSet<Identifier> subSet(Identifier fromElement, boolean fromInclusive, Identifier toElement, boolean toInclusive)
- Parameters:
fromElement
- the 'from' identifier to matchfromInclusive
- if inclusive or nottoElement
- the 'to' identifier to matchtoInclusive
- if inclusive or not- Returns:
NavigableSet
ofIdentifier
- See Also:
TreeSet.subSet(java.lang.Object, boolean, java.lang.Object, boolean)
-
subSet
public java.util.SortedSet<Identifier> subSet(Identifier fromElement, Identifier toElement)
- Specified by:
subSet
in interfacejava.util.SortedSet<Identifier>
- Parameters:
fromElement
- the 'from' identifier to matchtoElement
- the 'to' identifier to match- Returns:
SortedSet
ofIdentifier
- See Also:
TreeSet.subSet(java.lang.Object, java.lang.Object)
-
tailSet
public java.util.SortedSet<Identifier> tailSet(Identifier fromElement)
- Specified by:
tailSet
in interfacejava.util.SortedSet<Identifier>
- Parameters:
fromElement
- the 'from' identifier to match- Returns:
SortedSet
ofIdentifier
- See Also:
TreeSet.tailSet(java.lang.Object)
-
tailSet
public java.util.NavigableSet<Identifier> tailSet(Identifier fromElement, boolean inclusive)
- Parameters:
fromElement
- the 'from' identifier to matchinclusive
- if inclusive or not- Returns:
NavigableSet
ofIdentifier
- See Also:
TreeSet.tailSet(java.lang.Object, boolean)
-
toArray
public java.lang.Object[] toArray()
Convert theCollection
to an array ofObject
s.- Specified by:
toArray
in interfacejava.util.Collection<Identifier>
- Specified by:
toArray
in interfacejava.util.Set<Identifier>
- Returns:
- Object[]
- See Also:
Set.toArray()
-
toArray
public <T> T[] toArray(T[] a)
Convert theCollection
to an array of T objects.- Specified by:
toArray
in interfacejava.util.Collection<Identifier>
- Specified by:
toArray
in interfacejava.util.Set<Identifier>
- Type Parameters:
T
- a T object.- Parameters:
a
- an array of T objects.- Returns:
- T[]
-
toString
public java.lang.String toString()
Description copied from class:UntypedData
- Overrides:
toString
in classUntypedData
-
-