Platform SDK Java 8.5 API Reference

com.genesyslab.platform.apptemplate.filtering.impl
Class ValueList

java.lang.Object
  extended by com.genesyslab.platform.apptemplate.filtering.impl.ValueList
All Implemented Interfaces:
java.lang.Cloneable

public class ValueList
extends java.lang.Object
implements java.lang.Cloneable

Represent value list of strings, integers, enums or patterns. NOTE: integers and enums converted to strings. This implementation is thread safe.


Constructor Summary
ValueList()
           
ValueList(ValueList values)
           
ValueList(ValueList values, boolean readOnly)
           
 
Method Summary
 void clear()
          Removes all values from list (if it isn't read-only list).
 java.lang.Object clone()
           
 boolean containsAny(ValueList list)
          Checks if this value list contains any element from specified value list.
 int getCapacity()
           
 boolean put(GEnum value)
          Puts new enum value if it haven't contained yet.
 boolean put(java.lang.Integer value)
          Puts new integer value if it haven't contained yet.
 boolean put(java.lang.Object value)
          Puts new value if it haven't contained yet.
 boolean put(java.util.regex.Pattern value)
          Puts new pattern value if it haven't contained yet.
 boolean put(java.lang.String value)
          Puts string value if it haven't contained yet.
 boolean put(ValueList list)
          Puts non exists values from specified value list.
 boolean remove(GEnum value)
          Removes value if it exists.
 boolean remove(java.lang.Integer value)
          Removes value if it exists.
 boolean remove(java.lang.Object value)
          Removes value if it exists.
 boolean remove(java.util.regex.Pattern value)
          Removes value if it exists.
 boolean remove(java.lang.String value)
          Removes value if it exists.
 boolean remove(ValueList list)
          Removes values if it exists.
 boolean set(ValueList list)
           
 void setCapacity(int capacity)
           
 int size()
          Gets count of values.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueList

public ValueList()

ValueList

public ValueList(ValueList values)

ValueList

public ValueList(ValueList values,
                 boolean readOnly)
Method Detail

size

public int size()
Gets count of values.

Returns:
count of values.

containsAny

public boolean containsAny(ValueList list)
                    throws java.lang.NullPointerException
Checks if this value list contains any element from specified value list. NOTE: if this value will contain any patterns then they will be ignored in the operation.

Parameters:
list - list of constant values and patterns.
Returns:
true if this value list contains any element from specified value list or some value match to any pattern from list passed as argument.
Throws:
java.lang.NullPointerException - if argument list is null.

clear

public void clear()
Removes all values from list (if it isn't read-only list).


put

public boolean put(java.lang.String value)
            throws java.lang.NullPointerException,
                   java.lang.UnsupportedOperationException
Puts string value if it haven't contained yet.

Parameters:
value - new value.
Returns:
true if new value added.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

put

public boolean put(java.lang.Integer value)
            throws java.lang.NullPointerException,
                   java.lang.UnsupportedOperationException
Puts new integer value if it haven't contained yet. NOTE: integer will be converted to string. Therefore integer 1 will be equivalent to string '1'

Parameters:
value - new value.
Returns:
true if new value added.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

put

public boolean put(GEnum value)
            throws java.lang.NullPointerException
Puts new enum value if it haven't contained yet.

Parameters:
value - new value. NOTE: enum value will be converted to string.
Returns:
true if new value added.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

put

public boolean put(java.util.regex.Pattern value)
            throws java.lang.NullPointerException
Puts new pattern value if it haven't contained yet.

Parameters:
value - new value.
Returns:
true if new value added.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

put

public boolean put(java.lang.Object value)
            throws java.lang.IllegalArgumentException,
                   java.lang.NullPointerException
Puts new value if it haven't contained yet.

Parameters:
value - new value.
Returns:
true if new value added.
Throws:
java.lang.IllegalArgumentException - if value type isn't supported.
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

put

public boolean put(ValueList list)
            throws java.lang.NullPointerException,
                   java.lang.UnsupportedOperationException
Puts non exists values from specified value list.

Parameters:
list - source of new values.
Returns:
true if even one value added.
Throws:
java.lang.NullPointerException - if list argument is null
java.lang.UnsupportedOperationException - if this value list is readonly.

remove

public boolean remove(java.lang.String value)
               throws java.lang.NullPointerException
Removes value if it exists.

Parameters:
value - to remove.
Returns:
true if value removed.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

remove

public boolean remove(java.lang.Integer value)
               throws java.lang.NullPointerException
Removes value if it exists.

Parameters:
value - to remove.
Returns:
true if value removed.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

remove

public boolean remove(GEnum value)
               throws java.lang.NullPointerException
Removes value if it exists.

Parameters:
value - to remove.
Returns:
true if value removed.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

remove

public boolean remove(java.util.regex.Pattern value)
               throws java.lang.NullPointerException
Removes value if it exists.

Parameters:
value - to remove.
Returns:
true if value removed.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

remove

public boolean remove(java.lang.Object value)
               throws java.lang.NullPointerException,
                      java.lang.IllegalArgumentException
Removes value if it exists.

Parameters:
value - to remove.
Returns:
true if value removed.
Throws:
java.lang.NullPointerException - if value argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.
java.lang.IllegalArgumentException

remove

public boolean remove(ValueList list)
               throws java.lang.NullPointerException
Removes values if it exists.

Parameters:
list - values which should be removed from this value list.
Returns:
true if any value removed .
Throws:
java.lang.NullPointerException - list argument is null.
java.lang.UnsupportedOperationException - if this value list is readonly.

set

public boolean set(ValueList list)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getCapacity

public int getCapacity()

setCapacity

public void setCapacity(int capacity)

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.