Skip to content
Permalink
Browse files

New Classes to implement

  • Loading branch information...
Ghost-Programmer committed Feb 1, 2019
1 parent d88f17d commit c1dd6e2bda7d173fba73ad609fbe74dafb21cd3f
@@ -0,0 +1,23 @@
/**
*
*/
package name.mymiller.extensions.utils.pipelines.pipes;

import java.util.List;

import name.mymiller.extensions.utils.pipelines.PipeFuture;
import name.mymiller.extensions.utils.pipelines.PipeInterface;

/**
* @author jmiller
*
*/
public class ObjectInputStreamPIpe<S, T> implements PipeInterface<S, T> {

@Override
public T process(S data, List<PipeFuture<?>> futures, String pipelineName, boolean isParallel) {
// TODO Auto-generated method stub
return null;
}

}
@@ -0,0 +1,16 @@
package name.mymiller.extensions.utils.pipelines.pipes;

import java.util.List;

import name.mymiller.extensions.utils.pipelines.PipeFuture;
import name.mymiller.extensions.utils.pipelines.PipeInterface;

public class ObjectOutputStreamPipe<S, T> implements PipeInterface<S, T> {

@Override
public T process(S data, List<PipeFuture<?>> futures, String pipelineName, boolean isParallel) {
// TODO Auto-generated method stub
return null;
}

}
@@ -0,0 +1,85 @@
/**
*
*/
package name.mymiller.extensions.utils.pipelines.switches;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.function.Predicate;

/**
* @author jmiller
*
*/
public abstract class PropertyChangeListenerSwitch<T> implements Predicate<T>, PropertyChangeListener {

private String propertyName;

private Object newValue;
private Object source;
private Object oldValue;

/**
*
*/
public PropertyChangeListenerSwitch() {
// TODO Auto-generated constructor stub
}

/**
* @param propertyName
* @param newValue
* @param source
* @param oldValue
*/
public PropertyChangeListenerSwitch(String propertyName, Object newValue, Object source, Object oldValue) {
super();
this.propertyName = propertyName;
this.newValue = newValue;
this.source = source;
this.oldValue = oldValue;
}

/**
* @return the newValue
*/
protected synchronized Object getNewValue() {
return this.newValue;
}

/**
* @return the oldValue
*/
protected synchronized Object getOldValue() {
return this.oldValue;
}

/**
* @return the propertyName
*/
protected synchronized String getPropertyName() {
return this.propertyName;
}

/**
* @return the source
*/
protected synchronized Object getSource() {
return this.source;
}

/*
* (non-Javadoc)
*
* @see java.beans.PropertyChangeListener#propertyChange(java.beans.
* PropertyChangeEvent)
*/
@Override
public void propertyChange(PropertyChangeEvent evt) {
this.propertyName = evt.getPropertyName();
this.newValue = evt.getNewValue();
this.source = evt.getSource();
this.oldValue = evt.getOldValue();
}

}

0 comments on commit c1dd6e2

Please sign in to comment.
You can’t perform that action at this time.