- java.lang.Object
-
- com.pervasive.datarush.ports.record.AliasSet
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(String name)Returns whether this set contains the given aliasbooleancontainsAny(AliasSet other)Returns true if this set contains any of the member of the other setstatic AliasSetcreateSet(SortKey key)Creates a set consisting of the given ordered keystatic AliasSetcreateSet(String key)Creates a set consisting of a single key.static AliasSetcreateSet(String[] keys)Creates a set consisting of an array of keys.static AliasSetcreateSet(String[] keys, TokenOrder order)Creates a set consisting of an array of keys and specified orderstatic AliasSet[]createSets(SortKey[] keys)Creates multiple single-key sets of specified order.static AliasSet[]createSets(String[] keys)Creates multiple single-key sets.booleanequals(Object o)Stringfirst()Returns the first member of this setstatic String[]first(AliasSet[] sets)Returns the first keys in each of the given setsSortKeyfirstSortKey()Returns the first member of this set, combined with the order to make a SortKeystatic SortKey[]firstSortKeys(AliasSet[] sets)Returns the first sort keys in each of the given setsSet<String>getKeys()Returns the aliases in this setTokenOrdergetOrder()Return the order associated with this set.inthashCode()booleanisEmpty()Returns whether this is an empty setIterator<String>iterator()static AliasSet[]remap(AliasSet[] sets, FieldRemapping mapping)Remaps each set according to the given remappingAliasSetremap(FieldRemapping mapping)Applies the field remapping to the names in this set, returning a new set.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
remap
public AliasSet remap(FieldRemapping mapping)
Applies the field remapping to the names in this set, returning a new set. This set is not modified- Parameters:
mapping- the field remapping- Returns:
- a new set
-
getKeys
public Set<String> getKeys()
Returns the aliases in this set- Returns:
- the aliases in this set
-
getOrder
public TokenOrder getOrder()
Return the order associated with this set.- Returns:
- the order. Will never be null but might not be relavant in the context in which this set is used.
-
isEmpty
public boolean isEmpty()
Returns whether this is an empty set- Returns:
- whether this is an empty set
-
containsAny
public boolean containsAny(AliasSet other)
Returns true if this set contains any of the member of the other set- Parameters:
other- the other set- Returns:
- whether the union of this set and the other set is non-empty
-
contains
public boolean contains(String name)
Returns whether this set contains the given alias- Parameters:
name- the alias- Returns:
- whether this set contains the given alias
-
first
public String first()
Returns the first member of this set- Returns:
- the first member of this set
-
firstSortKey
public SortKey firstSortKey()
Returns the first member of this set, combined with the order to make a SortKey- Returns:
- the first SortKey of this set
-
createSet
public static AliasSet createSet(String key)
Creates a set consisting of a single key. Order defaults to ascending- Parameters:
key- the key- Returns:
- a new set
-
createSet
public static AliasSet createSet(String[] keys)
Creates a set consisting of an array of keys. Order defaults to ascending- Parameters:
keys- the keys- Returns:
- a set consisting of an array of keys
-
createSet
public static AliasSet createSet(String[] keys, TokenOrder order)
Creates a set consisting of an array of keys and specified order- Parameters:
keys- the keysorder- the order- Returns:
- a set consisting of an array of keys
-
createSet
public static AliasSet createSet(SortKey key)
Creates a set consisting of the given ordered key- Parameters:
key- the key- Returns:
- a new set
-
createSets
public static AliasSet[] createSets(String[] keys)
Creates multiple single-key sets. Order defaults to ascending.- Parameters:
keys- the keys- Returns:
- the new sets
-
createSets
public static AliasSet[] createSets(SortKey[] keys)
Creates multiple single-key sets of specified order.- Parameters:
keys- the keys- Returns:
- the new sets
-
first
public static String[] first(AliasSet[] sets)
Returns the first keys in each of the given sets- Parameters:
sets- the sets- Returns:
- the first keys
-
firstSortKeys
public static SortKey[] firstSortKeys(AliasSet[] sets)
Returns the first sort keys in each of the given sets- Parameters:
sets- the sets- Returns:
- the first sort keys
-
remap
public static AliasSet[] remap(AliasSet[] sets, FieldRemapping mapping)
Remaps each set according to the given remapping- Parameters:
sets- the sets to remapmapping- the remapping- Returns:
- the remapped sets
-
-