Package org.cyclos.impl.utils
Class BooleanPropertiesHolderImpl<K>
- java.lang.Object
-
- org.cyclos.impl.utils.BooleanPropertiesHolderImpl<K>
-
- Type Parameters:
K- the type of the object containing the boolean properties
public class BooleanPropertiesHolderImpl<K> extends Object implements BooleanPropertiesHolder<K>, Iterable<Map<String,Object>>, Cloneable
Iterablecontaining a map from K toBooleanProperties.
Each iteration is a map with all boolean properties plus the mappingkeyPropertyName-> K.
-
-
Constructor Summary
Constructors Constructor Description BooleanPropertiesHolderImpl()BooleanPropertiesHolderImpl(Map<K,BooleanProperties> booleansMap, String keyPropertyName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanPropertiesHolder<K>clone()booleancontainsKey(K key)Returns whether the given key is contained in this holderstatic <T> BooleanPropertiesHolderImpl<T>empty()Set<Map.Entry<K,BooleanProperties>>entries()Returns all entries of key andBooleanPropertiesBooleanPropertiesHolder<K>filter(K key, List<com.querydsl.core.types.Path<Boolean>> properties)Returns a new instance containing only the given required key.
If no property is given then all properties associated to the key will be included.BooleanPropertiesget(K key)Returns theBooleanPropertiesfor the given keyMap<K,BooleanProperties>getBooleansMap()Returns aMapcontaining all keys andBooleanPropertiesStringgetKeyPropertyName()booleanisAnyKeySet(com.querydsl.core.types.Path<Boolean> property)Returns whether there is at least one key with the given property setbooleanisSet(K key, com.querydsl.core.types.Path<Boolean> property)Returns whether the given key has the corresponding property set or notIterator<Map<String,Object>>iterator()Set<K>keys()Returns all keysSet<K>keys(com.querydsl.core.types.Path<Boolean> property)Set<K>keysSet(com.querydsl.core.types.Path<Boolean> property)Returns all keys which have the corresponding property setSet<K>keysSet(Set<com.querydsl.core.types.Path<Boolean>> anyOfProperties)Returns all keys which have any of the corresponding properties setvoidremove(K key)Removes the given key, returning weather it was really removedStringtoString()Collection<BooleanProperties>values()Returns allBooleanProperties-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
BooleanPropertiesHolderImpl
public BooleanPropertiesHolderImpl()
-
BooleanPropertiesHolderImpl
public BooleanPropertiesHolderImpl(Map<K,BooleanProperties> booleansMap, String keyPropertyName)
-
-
Method Detail
-
empty
public static <T> BooleanPropertiesHolderImpl<T> empty()
-
clone
public BooleanPropertiesHolder<K> clone()
-
containsKey
public boolean containsKey(K key)
Description copied from interface:BooleanPropertiesHolderReturns whether the given key is contained in this holder- Specified by:
containsKeyin interfaceBooleanPropertiesHolder<K>
-
entries
public Set<Map.Entry<K,BooleanProperties>> entries()
Description copied from interface:BooleanPropertiesHolderReturns all entries of key andBooleanProperties- Specified by:
entriesin interfaceBooleanPropertiesHolder<K>
-
filter
public BooleanPropertiesHolder<K> filter(K key, List<com.querydsl.core.types.Path<Boolean>> properties)
Description copied from interface:BooleanPropertiesHolderReturns a new instance containing only the given required key.
If no property is given then all properties associated to the key will be included. Otherwise only the specified one.- Specified by:
filterin interfaceBooleanPropertiesHolder<K>
-
get
public BooleanProperties get(K key)
Description copied from interface:BooleanPropertiesHolderReturns theBooleanPropertiesfor the given key- Specified by:
getin interfaceBooleanPropertiesHolder<K>
-
getBooleansMap
public Map<K,BooleanProperties> getBooleansMap()
Description copied from interface:BooleanPropertiesHolderReturns aMapcontaining all keys andBooleanProperties- Specified by:
getBooleansMapin interfaceBooleanPropertiesHolder<K>
-
getKeyPropertyName
public String getKeyPropertyName()
-
isAnyKeySet
public boolean isAnyKeySet(com.querydsl.core.types.Path<Boolean> property)
Description copied from interface:BooleanPropertiesHolderReturns whether there is at least one key with the given property set- Specified by:
isAnyKeySetin interfaceBooleanPropertiesHolder<K>
-
isSet
public boolean isSet(K key, com.querydsl.core.types.Path<Boolean> property)
Description copied from interface:BooleanPropertiesHolderReturns whether the given key has the corresponding property set or not- Specified by:
isSetin interfaceBooleanPropertiesHolder<K>
-
keys
public Set<K> keys()
Description copied from interface:BooleanPropertiesHolderReturns all keys- Specified by:
keysin interfaceBooleanPropertiesHolder<K>
-
keysSet
public Set<K> keysSet(com.querydsl.core.types.Path<Boolean> property)
Description copied from interface:BooleanPropertiesHolderReturns all keys which have the corresponding property set- Specified by:
keysSetin interfaceBooleanPropertiesHolder<K>
-
keysSet
public Set<K> keysSet(Set<com.querydsl.core.types.Path<Boolean>> anyOfProperties)
Description copied from interface:BooleanPropertiesHolderReturns all keys which have any of the corresponding properties set- Specified by:
keysSetin interfaceBooleanPropertiesHolder<K>
-
remove
public void remove(K key)
Description copied from interface:BooleanPropertiesHolderRemoves the given key, returning weather it was really removed- Specified by:
removein interfaceBooleanPropertiesHolder<K>
-
values
public Collection<BooleanProperties> values()
Description copied from interface:BooleanPropertiesHolderReturns allBooleanProperties- Specified by:
valuesin interfaceBooleanPropertiesHolder<K>
-
-