Browse Source

Moved BuildAlert from inner class to top-level class.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270470 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
aca4841ccd
2 changed files with 162 additions and 0 deletions
  1. +81
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java
  2. +81
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java

+ 81
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java View File

@@ -0,0 +1,81 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.ant.taskdefs.optional.sound;

import java.io.File;

/**
* A class to be extended by any BuildAlert's that require the output of
* sound.
*/
public class BuildAlert
{
private File m_source;
private int m_loops;
private Long m_duration;

/**
* Sets the duration in milliseconds the file should be played.
*
* @param duration The new Duration value
*/
public void setDuration( Long duration )
{
m_duration = duration;
}

/**
* Sets the number of times the source file should be played.
*
* @param loops the number of loops to play the source file
*/
public void setLoops( int loops )
{
m_loops = loops;
}

/**
* Sets the location of the file to get the audio.
*
* @param source the name of a sound-file directory or of the audio file
*/
public void setSource( final File source )
{
m_source = source;
}

/**
* Gets the duration in milliseconds the file should be played.
*
* @return The Duration value
*/
public Long getDuration()
{
return m_duration;
}

/**
* Sets the number of times the source file should be played.
*
* @return the number of loops to play the source file
*/
public int getLoops()
{
return m_loops;
}

/**
* Gets the location of the file to get the audio.
*
* @return The Source value
*/
public File getSource()
{
return m_source;
}
}

+ 81
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java View File

@@ -0,0 +1,81 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.ant.taskdefs.optional.sound;

import java.io.File;

/**
* A class to be extended by any BuildAlert's that require the output of
* sound.
*/
public class BuildAlert
{
private File m_source;
private int m_loops;
private Long m_duration;

/**
* Sets the duration in milliseconds the file should be played.
*
* @param duration The new Duration value
*/
public void setDuration( Long duration )
{
m_duration = duration;
}

/**
* Sets the number of times the source file should be played.
*
* @param loops the number of loops to play the source file
*/
public void setLoops( int loops )
{
m_loops = loops;
}

/**
* Sets the location of the file to get the audio.
*
* @param source the name of a sound-file directory or of the audio file
*/
public void setSource( final File source )
{
m_source = source;
}

/**
* Gets the duration in milliseconds the file should be played.
*
* @return The Duration value
*/
public Long getDuration()
{
return m_duration;
}

/**
* Sets the number of times the source file should be played.
*
* @return the number of loops to play the source file
*/
public int getLoops()
{
return m_loops;
}

/**
* Gets the location of the file to get the audio.
*
* @return The Source value
*/
public File getSource()
{
return m_source;
}
}

Loading…
Cancel
Save