Package overit.geocall.util
Class SubSet
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
java.util.HashSet
java.util.LinkedHashSet
overit.geocall.util.SubSet
- All Implemented Interfaces:
Serializable,Cloneable,Iterable,Collection,SequencedCollection,SequencedSet,Set
Utility class that extends
LinkedHashSet and has two more parameters, from and to- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSubSet()Creates a new instance of SubSetSubSet(Collection<?> set) Creates a new instance of SubSet -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified element to this set if it is not already present.voidAdds the specified element to this set if it is not already present.longgetFrom()Returns the parameter fromgetLong(int i) Returns the long of the specified position in the setlonggetTo()Returns the parameter tovoidsetFrom(long from) Sets the parameter fromvoidsetTo(long to) Sets the parameter toMethods inherited from class java.util.LinkedHashSet
addFirst, addLast, getFirst, getLast, newLinkedHashSet, removeFirst, removeLast, reversed, spliteratorMethods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, newHashSet, remove, size, toArray, toArrayMethods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
SubSet
public SubSet()Creates a new instance of SubSet -
SubSet
Creates a new instance of SubSet- Parameters:
set- The set to add
-
-
Method Details
-
setFrom
public void setFrom(long from) Sets the parameter from- Parameters:
from- The parameter from
-
setTo
public void setTo(long to) Sets the parameter to- Parameters:
to- The parameter to
-
getFrom
public long getFrom()Returns the parameter from- Returns:
- The parameter from
-
getTo
public long getTo()Returns the parameter to- Returns:
- The parameter to
-
add
Adds the specified element to this set if it is not already present.- Parameters:
set- set to be added to this set
-
add
Adds the specified element to this set if it is not already present.- Parameters:
set- set to be added to this setfrom- The parameter fromto- The parameter to
-
getLong
Returns the long of the specified position in the set- Parameters:
i- The desired position- Returns:
- The long of the specified position in the set
-