
com.lyncode.choiceprops.element.ListContainable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plural-property Show documentation
Show all versions of plural-property Show documentation
Plural Properties by Lyncode
The newest version!
package com.lyncode.choiceprops.element;
import java.util.ArrayList;
import java.util.List;
public class ListContainable implements IContainable {
private List list;
public ListContainable () {
list = new ArrayList();
}
public ListContainable (int v) {
list = new ArrayList();
list.add(new IntegerContainable(v));
}
public ListContainable (int... v) {
list = new ArrayList();
for (int a : v)
list.add(new IntegerContainable(a));
}
public boolean add(String number) {
list.add(new IntegerContainable(number));
return true;
}
public boolean add (IContainable cont) {
list.add(cont);
return true;
}
public boolean add(int v) {
list.add(new IntegerContainable(v));
return true;
}
public boolean in(int value) {
boolean result = false;
for (IContainable i : list) {
result = result || i.in(value);
if (result) break;
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy